- There’s no need to call
equals
ifhashCode
differs. - There’s no need to call
hashCode
if(obj1 == obj2)
. - There’s no need for
hashCode
and/orequals
just to iterate – you’re not comparing objects - When needed to distinguish in between objects.
equals
if hashCode
differs.hashCode
if (obj1 == obj2)
.hashCode
and/or equals
just to iterate – you’re not comparing objects