結果 : counting frequencies of array elements java