Just for experimentation, I added a few nullkeys to the instance Hashmap. And he did not complain. What is the use of this?
The code,
Map hmap = new HashMap();
hmap.put("sushil","sushil11" );
hmap.put(null,null);
hmap.put(null,"king");
hmap.put(null,"nagasaki");
hmap.put(null,null);
How many keys are on the card?
source
share