title: Remove a specific element from an Arraylist in Java?
body: <p>I have an Arraylist with (String-)Arrays in it. Now I want to be able to delete a specific element from the Arraylist. </p>
  
  <p>Here is an example arraylist:</p>
  
  <pre><code>0:  [Name, , , ]
  1:  [Telefon, \(\d+\) \d+, DAFAE8, FF6262]
  2:  [E-Mail, ^[a-zA-Z0-9]+(?:(\.|_)[A-Za-z0-9!#$%&amp;'*+/=?^`{|}~-]+)*@(?!([a-zA-Z0-9]*\.[a-zA-Z0-9]*\.[a-zA-Z0-9]*\.))(?:[A-Za-z0-9](?:[a-zA-Z0-9-]*[A-Za-z0-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$, DAFAE8, FF6262]
  3:  [Company, , , ]
  4:  [Test, , , ]
  5:  [Test2, , , ]
  6:  [Test3, , , ]
  </code></pre>
  
  <p>Now I want to delete the 5th element (the array which includes Test2). How do I accomplish that?</p>
  
  <p>I already tried the following things:</p>
  
  <pre><code>public static List&lt;String[]&gt; removeSpecificElements(List&lt;String[]&gt; list, int i){
      list.remove(new Integer(i));
      return list;
  }
  </code></pre>
  
  <p>This one doesn't throw any kind of Exception, but doesn't work either.</p>
  
  <pre><code>public static List&lt;String[]&gt; removeSpecificElements(List&lt;String[]&gt; list, int i){
      list.remove(i);
      return list;
  }
  </code></pre>
  
  <p>This one throws ArrayIndexOutOfBounds.</p>
  
  <pre><code>public static List&lt;String[]&gt; removeSpecificElements(List&lt;String[]&gt; list, int i){
      Iterator&lt;String[]&gt; itr = list.iterator();
      itr.next();
      for (int x = 0; x &lt; i; x++){
          itr.next();
          System.out.println(itr);
      }
      itr.remove();
      return list;
  }
  </code></pre>
  
  <p>And this one always removes the first element.</p>
  
  <p>Could you please help me? </p>