I dont know how to create a tree data structure in java.
I tried with a class consisting of node field and arraylist child nodes. but it does not satisfy the requirement.
the requirement is that,
root: child1,child2,child3
child1:child4,child5
child2:child6,child7
on traversing it should print all the nodes as given above.
note: no node should have same elements as child.
please provide some way to implement this.....