Solved

Java iterate through different levels of childs

Posted on 2012-04-03
2
265 Views
Last Modified: 2013-11-24
I'm creating a mindmapping application
as of now I have a Node class. This Node object can have several Node objects as childs ( a list of Nodes).

Now as this can have several levels deep how do you iterate through all these Nodes?
0
Comment
Question by:Mutsop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 31

Accepted Solution

by:
GwynforWeb earned 500 total points
ID: 37802542
Are they arranged in a tree? If so I suggest you look at this http://en.wikipedia.org/wiki/Tree_traversal . There are different ways of going through the tree.
0
 
LVL 3

Author Closing Comment

by:Mutsop
ID: 37803103
aah haven't thought about it
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question