In K&B Book page -614, Question -7. I have 2 questions
1. Please let me know where is the explaination related to this question in present in the entire chapter.
2. If no hashcode() then each will go in it's own bucket, then no question of equal() comes into picture. But if hashcode present will duplicate keys (equals()) will be detected @ compile time or runtime. I think @ runtime . Please correct me if i am wrong.
1. I think that reading Using Maps section (page 563) would help.
2. t1.equals(t2) returns false because the hashCode() is not overriden, therefore the output will be 3. But if the hashCode() is overriden, then t1.equals(t2) will return true, therefore the output will be 2.