title: Java LinkedList class
body: <p>In class, I've implemented my own <code>LinkedList</code> class with a private <code>Node</code> class so I've never run into this issue before. But now I'm trying to re-do a problem using Java's built-in LinkedList library and am running into trouble. (its also been a few years since I last used Java).</p>
  <p>Lets say I had this simple skeleton. How would I pass the head Node into the function?</p>
  <pre><code>public static void main(String[] args)
  {
      LinkedList&lt;Integer&gt; test = new LinkedList&lt;Integer&gt;();
      doSomething(test.get(0));
  }
  
  
   
  private static void doSomething(Node a)
  {
      //stuff
  }
  </code></pre>
  <p>Also could someone remind me what the difference is between these two? I know the first you're basically casting the list as a LinkedList but why do so?</p>
  <pre><code>List&lt;E&gt; test = new LinkedList&lt;E&gt;();
  LinkedList&lt;E&gt; test = new LinkedList&lt;E&gt;();
  </code></pre>