Wondering is there more simple way than computing the character count of a given string as below?
String word = \"AAABBB\"; Map ch
String str = "Hello Manash"; Map hm = str.chars().mapToObj(c-> (char)c).collect(Collectors.groupingBy(c->c,Collectors.counting())); System.out.println(hm);