title: Display tree hierarchy with their values in Java
body: <p>I have to create a tree structure with a parent node having many children, and each child can also have their children. Each node will be identified by their unique id and name. </p>
  
  <p>So when I enter any id from the hierarchy, all node-ids and their child node-ids with their names should get printed. How can I achieve this(any sample code would help) and which collection should be used from collection framework or do I have to use plain data structures in Java?</p>