結果 : occurrence of each character in string java using for loop