When we put key-value pair in HashMap this could happen the hashcode of two keys could be same then how in this condition storing and retrieval of key-value will be handled.
Update
What I understand so far is that if two object key has same hash code then both key objects will be stored in same bucket and when I will say get(key)
then out of two objects with matching hashcode which element to fetch is decided by object.equals()
.