結果 : count the distinct elements in an array in java