Java Challenge 9
#HashSet #EqualsAndHashCode
What will be the output?
Aham Brahmasami
A{a=2, name='Govinda'}
That means, If the set has already an entry with the same hash key then it does not replace the old entry, it discards the new entry.
I was surprised to see; why there is no replace() method for the set but we have in other collections. Let me know the reason in the comment box below.
Thanks.