title: Why i am getting "Remove type arguments" error for "List<String> list1 = new ArrayList<String>();"
body: <p>i am trying to implementing <strong>ArrayList</strong> using String array.</p>
  
  <p>while implementing i am getting <strong>Remove type arguments</strong> error in my <em>eclipse</em>.</p>
  
  <p><strong>ArrayList.java</strong></p>
  
  <pre><code>import java.util.List;
  
  
  public class ArrayList {
  
  public static void main(String [] a)
  {
      String [] things = {"eggs","chicken","milk","butter"};
      List&lt;String&gt; list1 =  new ArrayList&lt;String&gt;();
  
      for(String s: things)
          list1.add(s);
  
      String [] morethings = {"chicken","milk"};
      List&lt;String&gt; list2 = (List&lt;String&gt;) new ArrayList ();
  
      for(String y: morethings)
          list2.add(y);
      for(int i=0; i&lt;list1.size();i++)
      {
          System.out.printf("%s ", list1.get(i));
      }
  }
  }
  </code></pre>