title: java.lang.IndexOutOfBoundsException: Source does not fit in dest
body: <p>On the following code:</p>
  
  <pre><code>static void findSubsets (ArrayList&lt;Integer&gt; numbers, int amount, int index)
  {
      ArrayList &lt;Integer&gt; numbersCopy = new ArrayList&lt;Integer&gt;(numbers.size());
      Collections.copy(numbersCopy, numbers);
  }
  </code></pre>
  
  <p>I'm getting the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.IndexOutOfBoundsException: Source does not fit in dest
          at java.util.Collections.copy(Collections.java:548)
          at backtracking2.Main.findSubsets(Main.java:61)
  </code></pre>
  
  <p>Why?</p>