Thursday, July 26, 2018

Collections such as HashMap and
HashSet use the hashcode value of an object to determine how the object should
be stored in the collection, and the hashcode is used again to help locate the object
in the collection.
Hashing retrieval is a two-step process.
1. Find the right bucket (using hashCode())
2. Search the bucket for the right element (using equals() ).

No comments: