Arun Singh Raaj wrote: If two objects have the same hash code, they may or may not be equal
Its depend on your requirement in application..
Like, i have tested with team pairs where i want same hash code for the object having same pair..
here, for Pair(a,b) and Pair(b,a) will give you same hash code..
where as default implementation of Pair class will give different hash code for
Pair(a,b) and Pair(b,a)
and you can override you equals method also as per your requirement in application.
Hope, you will get clarification