Pregunta de entrevista de Baidu

Describe the difference between HashMap and HashTable

Respuesta de la entrevista

Anónimo

3 de oct de 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