This is a Question from K & B pg 630. I'm wondering why duplicate entry is allowed. At first I thought it is because of the equals() and hashCode().I have added as well. Have I left out something?? Thanks in advance!
Meena R. Krishnan
posted 8 years ago
First, change harshCode() to hashcode().
Then print out the returns of add() to see the duplicate ones are failing.