title: How would I return this interface?
body: <p>I am tasked with completing an append method which would return a list interface. A list interface is a class given which basically just has simple methods such as size(), append(), etc. In a new class, I had to write an append method using linked lists, and return a list interface. The problem is with my return because it says that ListInterface cannot be instantiated. If it helps at all, the class ListInterface only has methods which we must implement in our new class. Here's my append method:</p>
  
  <pre><code>public ListInterface&lt;T&gt; append(T elem)
  {
      Node&lt;T&gt; curr= new Node&lt;T&gt;(elem,null);
      if(tail==null)
      {
          head=curr;
      }
      else
      {
          tail.setNext(curr);
      }
      tail=curr;
      size++;
      return new ListInterface&lt;T&gt;(head); //need help here
  }
  </code></pre>