1public class Node<E>{
2 private Node left;
3 private Node right;
4 private E elem;
5 public void printNodes(){
6 if(left!=null){
7 left.printNodes();
8 }
9 System.out.println(elem);
10 if(right!=null){
11 right.printNodes();
12 }
13 }
14}