結果 : java program to count occurrences of each element in an array