Is there such a java Data Structure that can store unique elements and the count of any repeated elements?
For example say I have the given data : "a", "a", "a", "b", "b" , "c" , "d" I add each data element to this data structure and would get something similar to :
element : count a : 3 b : 2 c : 1 d : 1
Is there a java data structure that is already made to do something similar to this?