this is taken from the SCJP 5 book, Page626, Qn 7:
As the code stands, I understand it outputs "3".
But I don't understand why hashCode() is uncommented, it outputs "2"?
Based on "THIS LINE" of code, t1.equals(t2) should be false, because it is comparing their "day" using "==", not "equals()". Then based on this logic, t2's value should not replace t1's. then there will be 3 mappings in the map. Where is my understanding wrong? Thanks.