Baidu interview question

Describe the difference between HashMap and HashTable

Interview Answer

Anonymous

Oct 3, 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