title: I am getting an error on .addFirst method, why?
body: <pre><code>import javax.swing.*;
  import java.util.*;
  import java.awt.*;
  
  public class ConverAryToList {
  
      public static void main(String[] args) { 
  
  
          // TODO Auto-generated method stub
  
          String[] stuff = { "people ", "watermelon ", "melons ", "fudge " };
          List&lt;String&gt; list = new java.util.LinkedList&lt;String&gt;(
                  Arrays.asList(stuff)); 
  
  
          list.add("pumpkin"); 
          list.addFirst("first"); 
  
          stuff = list.toArray(new String[list.size()]); 
  
          for (String x : stuff)
              System.out.printf("%s", x);
  
      }
  
  }
  </code></pre>
  
  <p>This is a simple exercise on adding elements to a list. On <strong>list.addFirst</strong> I get: <em>The method addFirst(String) is undefined for the type List</em>. Where did I go wrong?</p>