This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to work with sets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to work with sets?" Watch "How to work with sets?" New topic
Author

How to work with sets?

Bob Zoloman
Ranch Hand

Joined: Jul 02, 2006
Posts: 72
I'm new to java, and i only have experience using array type data structures. How can I store multiple sets within a set?

Ex: Store the following sets in HashSet1

[2, 25] - set 1
[4, 64, 2, 1] - set 2
[7, 3, 12, 0] - set 3

Each of the above is a unique set, so how can I store them in a hashset and access each set individually, so they printout like the above? Any help is appreciated.
Richard Green
Ranch Hand

Joined: Aug 25, 2005
Posts: 536

[2, 25] - set 1
[4, 64, 2, 1] - set 2
[7, 3, 12, 0] - set 3




MCSD, SCJP, SCWCD, SCBCD, SCJD (in progress - URLybird 1.2.1)
Bob Zoloman
Ranch Hand

Joined: Jul 02, 2006
Posts: 72
ty for your help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to work with sets?
 
Similar Threads
Collection in java
A Tricky Stored Procedure
Array index
Best Practices with JDBC->Object
XMI and Design Patterns