wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "HashSet" Watch "HashSet" New topic
Author

HashSet

Seth Anshul
Greenhorn

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.
 
Don't get me started about those stupid light bulbs.
 
subject: HashSet
 
Similar Threads
Iterator better for that?
How to remove dublicate elements from List
Hashmap
Question About TreeSet?
add values to a set and remove