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

Continue reading

Find answer to specific questions by searching them here. It's the best way to discover useful content.

Find more