$ java NullHandlingDemo === HashMap: null key and null value are both fine === hm.get(null) = nullKeyValue hm.get("k1") = null === ConcurrentHashMap: null key throws on put() === chm.put(null, "x") threw NullPointerException === ConcurrentHashMap: null value throws on put() === chm.put("k1", null) threw NullPointerException === ConcurrentHashMap: get(null) ALSO throws, not just put() === chm.get(null) threw: Cannot invoke "Object.hashCode()" because "key" is null