I am struggling on this one for quite some time now. I understand that if you are using hashset you must override hashcode and equals if you are dealing with objects different than String(Same strings have same hashcode I guess), and select which property to be taken in account, so the objects are unique by that property.
But whats is the deal with the hashmap? Do you need and when do you need to override hashcode() and equals() ? I am pretty sure you will tear me apart for that question, but if someone explains to me I will be more than happy. Tomorrow I have important test and this is something that's really bothering me!
I am asking particularly for hashmaps! For the hashset I think i understand the idea. I also read about hashcode() and hashfunction