title: Eclipse errors cannot be resolved to a type
body: <pre><code>import java.awt.List;
  import java.util.LinkedList;
  import java.util.ListIterator;    
  
  public class HW1 {
      public static void main(String[] args){    
  
          String s = "";
          boolean flag = false;
          int pos = -1;
  
          List roster = new LinkedList();   &lt;--
          roster.add ( "alice" );
          roster.add ( "bob" );
          roster.add ( "chad" );
          roster.add ( "dan" );
          ListIterator&lt;String&gt; bookmark = roster.listIterator(); &lt;--
  
          try {
              s = bookmark.next();
              s = bookmark.next();
              s = bookmark.next();
              s = bookmark.next();
              s = bookmark.next();
              flag = bookmark.hasNext();
              pos = bookmark.nextIndex();
          }catch ( Exception trouble ) {
              s = "Runtime Error generated";
          }
  
      }
  }
  </code></pre>
  
  <p>This is considered a homework question, however I'm not looking for an answer. I'm getting multiple errors about resolving to a type, at the first error I get LinkedList and List cannot be resolved to a type. At the second arrow I get ListIterator cannot be resolved to a type.</p>
  
  <p>I am very new to Eclipse and we haven't done any code writing yet for this class so I am not used to the format Can anyone tell me how to resolve the errors I am getting</p>
  
  <p>Updated* Same errors as before except I now have 3 more. List and LinkedList are a type mismatch, LinkedList is a raw type and references to a generic type need to be parameterized. then the second arrow I now get listIterator() is undefined for the type</p>