title: use same random array for each sort
body: <p>I'm trying to make it so i generate a random array but implement just that one same array(in the random order) with different sorts. I have:</p>
  
  <pre><code>public static void main(String[] args)
  {
      int[] array = new int[10];
      for(int i = 0; i &lt; array.length; i++) {
          array[i] = (int)(Math.random()*100);}
  
      System.out.println("\nBefore Bubble Sort: ");
      for (int element : array)
          System.out.print(element + "  "); 
  
      bubbleSort(array);
  
  
      System.out.println("After Bubble Sort: "); 
      for (int element : array)
          System.out.print(element + "  ");
      System.out.println("\n");
  
      System.out.println("\nBefore Insertion Sort: ");
      for (int element : array)
          System.out.print(element + "  "); 
  
      insertionSort(array);
  
  
      System.out.println("After Insertion Sort: "); 
      for (int element : array)
          System.out.print(element + "  ");
      System.out.println("\n");
  }
  </code></pre>
  
  <p>With corresponding code for the sorts (I will post them if necessary). Its output is:</p>
  
  <pre class="lang-none prettyprint-override"><code>Array Before Bubble Sort: 
  2 64 27 1 81 60 72 6 9 82
  Array After Bubble Sort: 
  1 2 6 9 27 60 64 72 81 82 
  
  Array Before Insertion Sort: 
  1 2 6 9 27 60 64 72 81 82 
  Array After Insertion Sort: 
  1 2 6 9 27 60 64 72 81 82 
  </code></pre>
  
  <p>I want this array <code>2 64 27 1 81 60 72 6 9 82</code> to be in the before insertion line as well. The sorted array from bubble sort is just being put in the insertion sort so it's not doing anything. I think I need to make a method for the random array and call that with each sort? How would I do that? Or any other solution I'd appreciate. I will edit with more information if needed.</p>