As per the below link
Hashcode and equals
So it is assumed that if 2 objects are equal (that is, equals() returns true), then their hashCodes() must retu
It is bad implementation of hashCode() , You should follow that contract.
hashCode()
equals has nothing to do with hashcode independently.
equals
hashcode
But when you use hashing data structure you should must follow this thing.