Question d’entretien chez Information Dynamics

Explain the Internal workings of HashMap

Réponse à la question d'entretien

Utilisateur anonyme

17 janv. 2023

HashMap uses it's inner class Node for storing map entries. HashMap stores entries into multiple singly linked lists, called buckets or bins. Default number of bins is 16 and it's always power of 2. HashMap uses hashCode() and equals() methods on keys for get and put operations.