File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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?