Question d’entretien chez Baidu

Describe the difference between HashMap and HashTable

Réponse à la question d'entretien

Utilisateur anonyme

3 oct. 2011

HashTable is based on the old Dictionary class, and HashMap is based on Map interface since Java 1.2; HashTable is thread safe while HashMap is not, and HashMap has better performance HashMap allows null for a key value