public void print(int depth)
 {
    int i;
 
    // Print the indentation and the data from the current node:
    for (i = 1; i <= depth; i++)
       System.out.print("  hello  ");
    System.out.println(data);

    // Print the left subtree (or a dash if there is a right child and no left child)   
    if (left != null)
       left.print(depth+1);
    else if (right != null)
    {
       for (i = 1; i <= depth+1; i++)
          System.out.print(" hey   ");
       System.out.println("--");
    }

    // Print the right subtree (or a dash if there is a left child and no left child)  
    if (right != null)
       right.print(depth+1);
    else if (left != null)
    {
       for (i = 1; i <= depth+1; i++)
          System.out.print("    ");
       System.out.println("--");
    }
 }