SyntaxFix
Write A Post
Hire A Developer
Questions
The contract is that if obj1.equals(obj2) then obj1.hashCode() == obj2.hashCode() , it is mainly for performance reasons, as maps are mainly using hashCode method to compare entries keys.
obj1.equals(obj2)
obj1.hashCode() == obj2.hashCode()