結果 : count frequency of each element in an array using hashmap in java