In the
java doc for JDK1.4 for hasCode method in Object class it says
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.
So does it mean that if equals returns false then it's not necessary that the hascode of the two object will be different??And if yes can someone give some example where equals will return false and the hascode will be same.
Sasmit
SCJP1.4