title: Why is setNext in add (to front) method there?
body: <p>I am not able to understand why the <code>newNode.setNext</code> is there. If the first node is not empty, the <code>newNode</code> adds to the last previous item. Can someone explain this?</p>
  
  <p>I just want someone to illustrate this algorithm a bit better </p>
  
  <pre><code>Node&lt;ListType&gt; first = null;
  
  public void add(ListType data) {
     Node&lt;ListType&gt; newNode = new Node&lt;ListType&gt;(data);   
     if (first != null)
     {
         newNode.setNext(first);
         first = newNode;
         return;
     }
     first = newNode;
   }
  </code></pre>