title: java array shuffling
body: <p>I've noticed that the underlying int array is getting changed given the way the list is being created:</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.Collections;
  import java.util.List;
  import java.util.Random;
  
  
  public class Shuffling {
  
      static Integer[] intArr = {1, 2, 3, 4, 5};
      static Random random = new Random(7);
      public static void main(String[] args) {
  
          List&lt;Integer&gt; intList = new ArrayList&lt;Integer&gt;(Arrays.asList(intArr));
          Collections.shuffle(intList, random);
          System.out.println("List after shuffling: " + intList);
          System.out.println("intArr: " + Arrays.toString(intArr));
          //OUTPUT:
          //List after shuffling: [5, 4, 1, 3, 2]
          //intArr: [1, 2, 3, 4, 5]
  
  
          List&lt;Integer&gt; intList2 = Arrays.asList(intArr);
          Collections.shuffle(intList2, random);
          System.out.println("List2 after shuffling: " + intList2);
          System.out.println("intArr: " + Arrays.toString(intArr));
          //OUTPUT:
          //List2 after shuffling: [5, 3, 4, 2, 1]
          //intArr: [5, 3, 4, 2, 1]
      }
  }
  </code></pre>
  
  <p>Why is that happening?</p>