Page: Difference Between HashMap and Hashtable
Following are the differences between HashMap and Hashtable class in java:
- HashMap class is not synchronized in java that means multiple threads can access it simultaneously.
- HashMap class extends AbstractMap class.
- HashMap class allows one null key and multiple null values.
- Hashtable class is synchronized in java that means multiple threads cannot access it simultaneously.
- Hashtable class extends Dictionary class.
- Hashtable class does not allow any null key and value.
ADD COMMENT • link •