Difference in ConcurrentHashMap and synchronized Map

Tutorials Shared by the Internet Community


Difference in ConcurrentHashMap and synchronized Map

JDK 1.5 introduces some good concurrent collections which is highly efficient for high volume


  • Total Hits - 32888

  • Total Votes - 99 votes

  • Vote Up - 42 votes

  • Vote Down - 57 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Collections

  • Submitted By - Javin Paul

  • Submitted on - 2011-07-03 05:58:03


The synchronized collections classes, Hashtable and Vector, and the synchronized wrapper classes, Collections.synchronizedMap and Collections.synchronizedList, provide a basic conditionally thread-safe implementation of Map and List. However, several factors make them unsuitable for use in highly concurrent applications for example their single collection-wide lock is an impediment to scalability and it often becomes necessary to lock a collection for a considerable time during iteration to prevent ConcurrentModificationException    More detail...

Broken  |   Save  |   Liked  |   Down

E-Books Store