posted 10 years ago
Hi All,
Can someone clarify my following doubt.
HashMap hm =new HashMap();
hm.put("A","RAM");
hm.put(null,"Laxman");
System.out println(hm.get(null));
Output -Laxman
My dobut is while using hm.get(null) ,It should thow NullPointerException.But output coming as "Laxman" .Can Someone clarify it for me.