0

I have a List<String> which is like,

List<String> dummyList=Arrays.asList("a","b","c","a","b","d","e","f");

I need to traverse through the list and need the count of only "a","b","c" from list and store the alphabet as key and count of presence of same alphabet as value.

The final map which i have to get is like following keys and with the counts,

a:2
b:2
c:1
Aravind.V
  • 1
  • 2

0 Answers0