title: Random number array sorting
body: <p>I'm having an issue sorting my random number array. </p>
  
  <p>What I'd like to do is make an if statement to make sure <code>arr[0]</code> is always greater than <code>arr[1]</code>. </p>
  
  <p>Why? Well, my program generates two random numbers from 0 - 99, and it does simple math problems such as subtraction and division. Since you can't divide 55 / 99 properly, the first <code>arr[0]</code> should always be larger than <code>arr[1]</code>.</p>
  
  <p>Here's where I'm at and thanks for your help!</p>
  
  <pre><code>public static int[] randomNumbers(){
      Random obj = new Random();
  
      int arr[] = new int[2];   //init array to hold 2 numbers
  
      arr[0] = obj.nextInt(99); //number 1 randomized 0 - 9 // sort array
      arr[1] = obj.nextInt(99); //number 2 randomized 0 - 9
  
      //do compare to make sure arr[0] is always greater than arr[1]
      //but how???
  
      return arr;
  
      /*int rgen = obj.nextInt(10); //first number has to be larger than second 0 - 10
      int rgen1 = obj.nextInt(9); //random 0 - 9
      int randomNumber = rgen + rgen1; //stores the answer*/
  }
  </code></pre>