title: Java Binary Search Tree with JSS2 Homework
body: <p>I'm just trying to add an element to a binary search tree but I get a NullPointerException. </p>
  
  <p>I hate to ask but I really have had an awful teacher with the inability to clearly explain anything and I've tried for hours trying to understand. If someone could please just send me in the right direction I would greatly appreciate it cause I really do want to learn.</p>
  
  <pre><code>package jss2;
  import java.util.*;
  import jss2.exceptions.*;
  import jss2.*;
  
  public class LinkedBinaryTree {
      public static void main(String[] args) {
          System.out.println("Creating the tree");
          BinarySearchTreeADT&lt;String&gt; tree = new LinkedBinarySearchTree&lt;String&gt;();
  
          tree.addElement ("test");
      }
  } 
  </code></pre>