title: How does ConcurrentHashMap achieve its thread safe concurrency behavior?
body: <p>I have been going through the java.util.concurrent package and trying to understand what the library provides to us . I came across <code>CopyOnWriteArrayList</code> and <code>ConcurrentHashMap</code> classes and trying to find how these clases achieve thread safety . For <code>CopyOnWriteArrayList</code> it is pretty much intuitive and they are implemented by making a fresh copy of the underlying array whenever there is a write operation . However I am not able to understand the bigger picture of how the <code>ConcurrentHashMap</code> achieves thread safety , providing concurrency at the same time ?</p>
  
  <p><strong>Edit</strong> : It would be enough if anyone can tell me the concepts that goes behind the implementation . Taking that in mind I can delve more into the source code and thus will help me in understanding it in a better way and structured manner.</p>