Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

iterating through a collection of collections?

newJohnnewJohn Member Posts: 3
I have created a TreeMap of TreeMaps. I can iterate through the main map just fine, but I can't figure out how to iterate through the sub map. (the goal is to iterate through each sub map while iterating through the main map, not just to iterate through a particular sub map, if that makes any difference)

Any suggestions? Is it even possible?

Comments

  • j2me64j2me64 Member Posts: 20
    yes, its possible. you must nest two iterators, the first returns the treemaps one by one and the other iterates through the returned treemap.
Sign In or Register to comment.