This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Here the two classes are different, you cant compare to class objects with equals method. If you want you have to overload the equals method in your class. Using equals method you can compare primitive and reference variable's equality but not objects.