- #1
JoAuSc
- 198
- 1
I'm trying to create this program that allows the user to create and manipulate trees. For example, a user might create a new tree with a node containing "words" as its data, then create nodes containing "nouns", "verbs", "adjectives", etc. as their data. The problem is I don't know how to create or work with trees. Is there some kind of "Tree" object in java, where I can just write
Tree newTree = new Tree();
and manipulate the tree with methods like
newTree.addNode("nouns");
or
newString = newTree.node1.getData()
?
And if not, how would I work with trees?
Tree newTree = new Tree();
and manipulate the tree with methods like
newTree.addNode("nouns");
or
newString = newTree.node1.getData()
?
And if not, how would I work with trees?