What are the differences between a HashMap and a Hashtable in Java?

后端 未结 30 2423
青春惊慌失措
青春惊慌失措 2020-11-21 13:30

What are the differences between a HashMap and a Hashtable in Java?

Which is more efficient for non-threaded applications?

30条回答
  •  北荒
    北荒 (楼主)
    2020-11-21 13:42

    HashMap and Hashtable both are used to store data in key and value form. Both are using hashing technique to store unique keys. ut there are many differences between HashMap and Hashtable classes that are given below.

提交回复
热议问题