title: Converting a subList of an ArrayList to an ArrayList
body: <p>Im using an ArrayList and im trying to copy a part of it to another ArrayList therefore im using:</p>
  
  <pre><code>sibling.keys = (ArrayList&lt;Integer&gt;) keys.subList(mid, this.num);
  </code></pre>
  
  <p>Where "sibling.keys" is the new ArrayList and "keys or this.keys" is the older ArrayList.
  I used the casting because eclipse told me to do that but then it throws a <code>ClassCastException</code>:</p>
  
  <blockquote>
    <p>java.util.ArrayList$SubList cannot be cast to java.util.ArrayList</p>
  </blockquote>
  
  <p>Any advice?</p>