title: Java ClassNotFound error when executing via command line
body: <p>I am trying to execute Java program via command line and getting classnotfound error.</p>
  
  <pre><code>  1 import java.util.LinkedList;
    2 public class LinkedList {
    3         private static LinkedList&lt;String&gt; list;
    4         public static void main(String args[]) {
    5                 list = new LinkedList&lt;String&gt;();
    6                 list.add("Linked");
    7                 list.add("lists");
    8                 list.add("are");
    9                 list.add("awesome.");
   10                 System.out.println(list.getLast());
   11                 System.out.println("YES");
   12         }
   13 }
  ~       
  </code></pre>
  
  <p>This is the error I am getting:</p>
  
  <pre><code>javac LinkedList.java 
  LinkedList.java:1: LinkedList is already defined in this compilation unit
  import java.util.LinkedList;
  ^
  LinkedList.java:3: type LinkedList does not take parameters
      private static LinkedList&lt;String&gt; list;
                               ^
  LinkedList.java:5: type LinkedList does not take parameters
          list = new LinkedList&lt;String&gt;();
                               ^
  3 errors
  </code></pre>