I have a list of five numbers (a hand of cards). I'd like to get the frequency of each number in the list, and put that in a map, or something similar.
I know it's easy to implement this yourself. But I was curious, is there a way to do so in the Collections framework?
(To be clear, not the frequency of any particular number, but the frequency of every number, in the list.)