ConcurrentHashMap implements Segment class. Segment class behaves like a hashtable and is synchronized using RetrantLock. Retrieval of content from ConcurrentHashMap does not implement locking. But it returns the most updated value. While putting value in ConcurrentHashMap, it follows the below steps.
1. Check for null value, if null throw exception.
2. Create hash code
3. Get the segment table for the hashcode
4. Put the value