It seems that those two are exactly same, any confirms?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Primarily this: Multiset follows the Collection contract precisely, and generally plays better with other JDK collections utilities. Additionally, Multiset has generics support, supports the entrySet() method, and the setCount method, none of which appear to be offered by Bag.
They serve the same purpose, as you can clearly tell, but I’d like to think that Multiset wins in most respects.