Interview Question

Interview Beijing, Beijing (China)

Describe the difference between HashMap and HashTable


Interview Answer

1 Answer


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

Interview Candidate on Oct 3, 2011

Add Answers or Comments

To comment on this, Sign In or Sign Up.