HashTable
HashTable extends Dictionary The HashTable parent class dictionary is no longer used here.
It can be used with HashMap.
HashMap can cause a deadlock when used in multiple threads. *: To avoid this, ConcurrentHashMap was added from java1.5, multithreading Can be used in the environment.
4, difference in speed HashMap is fast HashTable is slow
Summary In general, you should use HashMap, but for multithreading, use ConcurrentHashMap.
https://github.com/YanHengGo/java/tree/master/03_hashmap
Recommended Posts