結果 : java code to count occurrences of char in string