I have a HashMap as below (assuming it has 10,0000 elements)
HashMap hm = new HashMap(); hm.put(\
HashMap hm = new HashMap();
hm.put(\
if(hm.put("John","1") != null) { // "John" was already a key in the map. The sole value for this key is now "1". }