title: What's the difference between ConcurrentHashMap and Collections.synchronizedMap(Map)?
body: <p>I have a Map which is to be modified by several threads concurrently. </p>
  
  <p>There seem to be three different synchronized Map implementations in the Java API:</p>
  
  <ul>
  <li><code>Hashtable</code></li>
  <li><code>Collections.synchronizedMap(Map)</code></li>
  <li><code>ConcurrentHashMap</code></li>
  </ul>
  
  <p>From what I understand, <code>Hashtable</code> is an old implementation (extending the obsolete <code>Dictionary</code> class), which has been adapted later to fit the <code>Map</code> interface. While it <em>is</em> synchronized, it seems to have serious <a href="http://www.ibm.com/developerworks/java/library/j-jtp07233.html" rel="noreferrer">scalability issues</a> and is discouraged for new projects.</p>
  
  <p>But what about the other two? What are the differences between Maps returned by <code>Collections.synchronizedMap(Map)</code> and <code>ConcurrentHashMap</code>s? Which one fits which situation?</p>