Why Java decided to allow \'null\' as a key in HashMap? As we know hashcode() can\'t be calculated on null value. Is there any design consideration for this decision to allow nu
From the JDK 1.2 Java Collections API Change Summary (not sure where to find the official version on Oracle's website):
Added null-key support to HashMap. This was done for consistency with TreeMap and the late, unlamented ArrayMap, and because customers requested it. Now all of our general-purpose collection implementations accept null keys, values and elements.
Joshua Bloch and Doug Lea disagreed on this, and this caused problems for concurrent hash maps.