How can I find the number of occurrences of a character in a string?
For example: The quick brown fox jumped over the lazy dog.
Some example
Java 8 way:
"The quick brown fox jumped over the lazy dog." .chars() .mapToObj(i -> (char) i) .collect(Collectors.groupingBy(Object::toString, Collectors.counting()));