The explanation given is that the equals method must be atleast as precise as the hashCode() method.
The first option ofcourse is correct; but I don't understand how the second option is correct. I mean doesn't that break the hashCode - equals contract for cases in which code.length() of both objects compared are equal & the values of bal & rate for both are interchanged? In such cases this.hashCode() != o.hashCode(), but this.equals(o) will be true right? Confused! Please help!