Question: why null key and value is not allowed in concurrenthashmap?
Answer: The main reason that nulls aren't allowed in ConcurrentMaps (ConcurrentHashMaps, ConcurrentSkipListMaps) is that ambiguities that may be just barely tolerable in non-concurrent maps can't be accommodated. ... get(key) returns null , you can't detect whether the key explicitly maps to null vs the key isn't mapped.