Find occurrences of characters in a Java String

Viewed 69193

I would like to count the occurrences of a character in a string, suppose I have the string "aaaab", how would i count the amount of a's in it?

16 Answers
Related