Hello everyone. This is my first post in the JavaRanch
SCJP forums and the look and the feel of this place is uber best .
I have a query regarding the HASHCODE AND EQUALS CONCEPT and I figure this is the best place to ask -:
[[As per the contract of hash code() --
1. If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
2. It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.]]
IS THERE ANY POSSIBILITY THAT or i should say that whether it can happen that the two objects are unequal but calling the hashcode() method on each of them must produce the same integer result ??