Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to work with sets?

 
Bob Zoloman
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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


 
Bob Zoloman
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ty for your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic