The job of equals() is to compare two different objects meaningfully. This means you can have 2 separate references to 2 different objects and if the 2 objects are same according to the definition provided by the programmer, equals() will return true.
The default implementation of equals() in Object returns true only if you have references to the same object. You are expected to override it so that it returns true even if you have two different objects that are semantically equivalent. [ October 15, 2006: Message edited by: Aniket Patil ]
SCJP 5.0 | SCWCD 1.4 <br /> <br />If you don't know where you are going, any road will take you there!