Question: why null values are not allowed in concurrenthashmap?
Answer: The main reason that null is not allowed in ConcurrentMaps such as ConcurrentHashMaps, ConcurrentSkipListMaps is to avoid ambiguities. ... In a non-concurrent map, you may check this using map. contains(key), but in a concurrent environment, the map might have changed between calls.