title: creating arrays in eclipse
body: <p>I  need to make the random array print, and it does, &amp;  then i need to make the code sort my random array and print that.
  I think, i have missed something out on the  code,  </p>
  
  <p>Can anyone help me please?<br>
  Thanks</p>
  
  <pre><code>import java.util.ArrayList;
  import java.util.Random;
  
  public class Lab5
  {   
    public static void main(String[]args)
    {
       Random r = new Random();
       int[]arr = new int[5];
  
       for(int i=0;i&lt;arr.length;i++)
       {
         arr[i] = Math.abs(r.nextInt()%255) +1;
         System.out.print(arr[i] + "\t");
        }
       System.out.println();
  }
  
  public static void ShowArray(ArrayList&lt;Integer&gt; array) {
  for (int i=0; i&lt;array.size(); i++) {
  System.out.println(array.get(i));
  
  System.out.println("Sort A: ");
  ArrayList&lt;Integer&gt; sortedArrayA = ThreeSorts.SortA(array);
  ShowArray(sortedArrayA);
      }
     }
    }
  </code></pre>