I have a string which structure is like:
email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org
Say that string is in variable 'content' and I got it from the first part of my program. And what I would like to get as an ouput is each name with its count like this:
Like what HashMap does, but I think HashMap cannot provide counting, but I am not sure.
How can I do this? I need to get count, but not necessary to do sort. Any idea would be greatly appreciated.