Question d’entretien chez Probity Soft

Which two method you need to implement for key Object in HashMap

Réponse à la question d'entretien

Utilisateur anonyme

26 oct. 2015

In order to use any object as Key in HashMap, it must implements equals and hashcode method in Java. Read How HashMap works in Java for detailed explanation on how equals and hashcode method is used to put and get object from HashMap