title: Random Array Sorting
body: <p>Is it possible to sort (ascending) the randomly generated integer array for the following code? If, so how?</p>
  
  <p>import java.util.Random;</p>
  
  <p>public class RandomArraySorter {</p>
  
  <pre><code>        public static void main(String args[]){
          Random random = new Random();
  
          int array[] = new int[10];
  
          //number of integer spaces within the array:
          for(int i = 0; i &lt; 10; i++){
  
          //random numbers from 1 to 100:
          array[i] = random.nextInt(100) + 1;
  
             System.out.print(array[i] + " ");
          }
      } //end of main
  } //end of class
  </code></pre>