public class Node { private Node leftNode; private Node rightNode; private int data; public Node( int data, Node leftNode, Node rightNode ){ this.data = data; this.leftNode = leftNode; this.rightNode = rightNode; } public Node getRightNodeReference(){ return this.rightNode; } public Node getLeftNodeReference(){ return this.leftNode; } public void setRightNodeReference(Node rightNode){ this.rightNode = rightNode; } public void setLeftNodeReference(Node leftNode){ this.leftNode = leftNode; } public int getData(){ return this.data; } }