E. equals() can be true even if it�s comparing different objects.
Originally posted by harinath chakrapani:
In short hashCode is used for object inequality
Originally posted by dolly shah:
Chandra in your code it is comparing two references, which refer to the same object.
"If you dont override equals() method, you wont be able to use those objects as a key in a hashtable & you probably wont get accurate sets."
I am not getting it. Can you explain?
Not korrekt. You may get duplicates.
Originally posted by phani bhushan reddy:
But with equals() without a hash code method will be possible