Home > DeveloperSection > Interviews > What is the difference between HashMap and Hashtable?

Posted on    May-12-2015 11:54 PM

 Java Java  Collection 
Ratings:
 1 Answer(s)
  418  View(s)
Rate this:

Mayank Tripathi
Mayank Tripathi

Total Post:807

Points:4035
Posted on    May-12-2015 11:54 PM

HashMap
1)HashMap is not synchronized.
2)HashMap can contain one null key and multiple null values.

Hashtable
1)Hashtable is synchronized.
2)Hashtable cannot contain any null key or null value.

Don't want to miss updates? Please click the below button!

Follow MindStick