Difference between HashMap and HashTable in Java

The following table shows the differences between the 'HashMap' and 'HashTable' in Java Technology.


HashMap

HashTable
1
HashMap uses java.util.HashMap
Hashtable uses java.util.Hashtable

2
HashMap is not Synchronized.
HashTable is Synchronized.

3
HashMap permits null values as key and value.
HashTable do not  permit null values as key and value.
4
HashMap is efficient than HashTable because HashMap is not Synchronized.
HashTable is less efficient because it is synchronized.
5

Iterator in the HashMap is fail-safe that means you can change the map while iterating.
Enumerator in the HashTable is not fail-safe.
6
HashMap can be synchronized as:
Map m = Collections.synchronizeMap(hashMap);
No need of making it synchronized.