// CSE 143, Autumn 2013 // Creates a tree of integer, prints its elements and checks // whether particular elements exist in the tree public class IntTreeClient { public static void main(String[] args) { IntTreeNode root = new IntTreeNode(1); root.left = new IntTreeNode(2); root.left.left = new IntTreeNode(4); root.left.right = new IntTreeNode(5); root.right = new IntTreeNode(3); root.right.right = new IntTreeNode(7); root.right.left = new IntTreeNode(6); IntTree tree = new IntTree(root); tree.print(); System.out.println(tree.contains(6)); System.out.println(tree.contains(7)); System.out.println(tree.contains(1)); System.out.println(tree.contains(-12)); } }