count.put(str.charAt(i) , count.get(str.charAt(i))+1); else count.put(str.charAt(i),1); //increase the count of characters by 1 ...