The equals() method tests the equality of two object references by their content. you should read thoroughly the documentation in java.lang.Object to review how equality is understood in this context.
The hashCode() method is used as a way to identify an object in memory. The "hash" itself is an alogorithm used to ensure any object's hashcode is always the same, and all objects in one system are uniquely identifiable. Again, you should read the documentation for java.lang.Object for a deeper understanding of this method's purpose.
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
It is difficult to free fools from the chains they revere - Voltaire. tiny ad: