File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes HashSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "HashSet" Watch "HashSet" New topic


Seth Anshul

Joined: May 02, 2006
Posts: 16
Is there a way for a HashSet to have duplicate values?
Amit Y Desai
Ranch Hand

Joined: Dec 06, 2007
Posts: 35
Hash set is meant for having non-duplicate values.
If you want duplicate values then go for other collection interfaces.
I agree. Here's the link:
subject: HashSet
It's not a secret anymore!