Page: Difference Between HashMap and Hashtable
1

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.
ADD COMMENTlink
modified 2.0 years ago by gravatar for Yashbeer Yashbeer170 written 2.1 years ago by gravatar for anuragsingh07378 anuragsingh0737830
Please log in to add an answer.