Re: How to count duplicate items in ArrayList?




How do you do this? I've looked at the docs and searched, and I can't
find anything explaining how to use this "frequency" method.

I don't think this is the best way to count duplicate items in an array
list, but I'm guessing deepak was referring to this method:

http://java.sun.com/javase/6/docs/api/java/util/Collections.html#frequency(java.util.Collection,%20java.lang.Object)



Ahh, there we go. That is exactly what I was looking for. Actually, that
entire page was what I was missing. Thanks :)


.



Relevant Pages