private void doPrintTree(ExpressionNode node, int depth) {
    if (node != null) {
      if (node.getLeftChild() != null) {
        doPrintTree(node.getLeftChild(), depth + 1);
      }

      if (node.getRightChild() != null) {
        doPrintTree(node.getRightChild(), depth + 1);
      }
    }
  }
 public void printTree() {
   doPrintTree(rootNode, 0);
 }