title: Java: array of sorted indexes
body: <p>Quick question: I have an array <code>double[]array=new double [10]</code> in which there are random doubles, say between 0 and 20.
  What i want is get another array <code>int []resultingArray=new int [array.length]</code> that each value int is the index of a value double of the <code>array[]</code> sorted form the biggest number to the smallest.
  Since my english sucks here is a "diagram":</p>
  
  <p>array = (2, 6, 3) <strong><em>_</em>__<em>_</em>_</strong> resultingArray = (1, 2, 0)</p>
  
  <p>It's an exam question. The doubles are GPAs from students and it asks for a method that returns an array composed of the IDs (which in my code are the indexes of double[]array) of the students from the best student to the worst.</p>