Binary Tree Traversal
public class TreeNode { Integer value ; TreeNode left ; TreeNode right ; public TreeNode(Integer value) { this . value = value; } public Integer getValue() { return value ; } public void setValue(Integer value) { this . value = value; } public TreeNode getLeft() { return left ; } public void setLeft(TreeNode left) { this . left = left; } public TreeNode getRight() { return right ; } public void setRight(TreeNode right) { this . right = right; } } public class TreeTraversal { public static TreeNode createTree() { TreeNode rootNode = new TreeNode( 9 ); TreeNode node1 = new TreeNode( 7 ); TreeNode node2 = new TreeNode( 10 ); TreeNode node3 = new TreeNode( 3 ); TreeNode node4 = new TreeNode( 8 ); rootNode.setLeft(node1); rootNode.setRight(node2); node1.setLeft(node3); node1.setRight(node