Work in HR or Recruiting?
Baidu
www.baidu.com Beijing, China 1000 to 5000 Employees
Work in HR? Complete Your Profile

9 interview experiences Back to all Baidu Interview Questions & Reviews

Interview Question for Software Engineer at Baidu:
Oct 3, 2011

Describe the difference between HashMap and HashTable


Add Tags [?]

See more for this Baidu Software Engineer Interview

Helpful Question?  
Yes | No
Inappropriate?

Answers & Comments (1)

Oct 3, 2011

by Interview Candidate:

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
Helpful Answer?  
Yes | No
Inappropriate?

To comment on this question, Sign In with Facebook or Sign Up

Tags are like keywords that help categorize interview questions that have something in common.