Question) How does ConcurrentHashMap achieve its Scalability?
Sometimes this multithreading + collection interview question is also asked as, the difference between ConcurrentHashMap and Hashtable in Java.
The problem with synchronized HashMap or Hashtable was that the whole Map is locked when a thread performs any operation with Map.
The java.util.ConcurrentHashMap class solves this problem by using the lock stripping technique, where the whole map is locked at different segments and only a particular segment is locked during the write operation, not the whole map.