hashcode and equals contract vice versa
I know the contract says "if two objects are equal then they should return the same hash code". That is so that those objects can be place in the same hash bucket and to improve hash code related collection functions know. Then again why it says "if two objects have same hash code those should not always be equals". I mean if it is true in the contract we should say "if two objects are equals they may return same hash code but which is not mandatory" I mean if it is true in the contract we should say "if two objects are equals they may return same hash code but which is not mandatory" No, it