[Solved] In JDK1.8, is it necessary to use ConcurrentHashMap on all occasions that require synchronization?
[ad_1] No, it is not necessary to replace use of Collections.synchronizedMap with ConcurrentHashMap when used by multiple threads. The Concurrent Collections section in the javadoc for package java.util.concurrent says: “Synchronized” classes can be useful when you need to prevent all access to a collection via a single lock, at the expense of poorer scalability. In … Read more