What are the differences between Hashmap vs Hashtable in theory?

后端 未结 4 1313
小蘑菇
小蘑菇 2020-12-20 02:53

Are there are differences between hashmap and hashtable in theory?

I don\'t mean in the concrete definitions given in Java (or the implementation), but in theory. I

4条回答
  •  星月不相逢
    2020-12-20 03:09

    the main difference is that the HashMap is accessed by all the threads at the same time and most of them do some changes, as a result of that some changes wont be visible for every single thread ( async) . The hashTable is sync and only one thread can access and change the the HashTable.

提交回复
热议问题