1
Difference Between HashMap and Hashtable

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.
1  upvotes

Next up

Read More Questions

If you are looking for answer to specific questions, you can search them here. We'll find the best answer for you.

Search

Study Full Subject

If you are looking for good study material, you can checkout our subjects. Hundreds of important topics are covered in them.

Know More