0
1.6kviews
Difference Between HashMap and Hashtable
1 Answer
1
1views

Following are the differences between HashMap and Hashtable class in java:

HashMap class

  • 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

  • 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.
Please log in to add an answer.