title: java.lang.IndexOutOfBoundsException for ArrayList
body: <p>I get an java.lang.IndexOutOfBoundsException for this code.</p>
  
  <pre><code>private List&lt;Integer&gt; LoeschenX = new ArrayList&lt;Integer&gt;();
  private List&lt;Integer&gt; LoeschenY = new ArrayList&lt;Integer&gt;();
  
  for (int i : LoeschenY) LoeschenX.add(LoeschenY.get(i));
  </code></pre>