outlaw outlaw -4 years ago 108
Java Question

Does java has multiset data structure like the one in c++ STL?

I need a data structure which works like the STL multiset but the TreeSet in Java doesn't allow duplicate elements. Is there any built-in data structure in Java which is equivalent to multiset ?

Answer Source

There is no Multiset in the standard Java libraries. You should use the Google Guava framework which contains Multiset classes. See

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download