Hi
Just to add to those comments already made. If you are overriding the equals method,
you should meet the contract specified in the API documentation for java.lang.Object. If there are other meaningful tests for equality include those. This is most common in data objects
For example an employee object using the equals method from Object would only return true if 2 instances they referred to the same object. It would be preferrable to have equals return true of the instances referred to the same employee (one test may be equality on the NI/social securtiy number, or maybe the employee number, etc).
Josh Bloch's excellent book
Effective Java Programming covers this and other rules.
Hope this helps
Ramen