title: Sorting array values so they correspond to other array being sorted (when it's actually unchanged)
body: <p>I am totally new to Java and this question might be simple but I really need help as I struggled to find any possible solution to this problem I have. </p>
  
  <p>At first, a short example to describe my problem. Let's say I have two array lists:</p>
  
  <pre><code>// prices
  [14, 2, 1, 10]
  
  // ID numbers which correspond to these prices
  [0, 1, 2, 3]
  </code></pre>
  
  <p>My goal is to sort these IDs so they would correspond to random integers being sorted in ascending order. In other words, the result should be: </p>
  
  <pre><code>// IDs sorted so they correspond to prices being in ascending order
  [2, 1, 3, 0]
  </code></pre>
  
  <p>And random integers array should remain the same.</p>
  
  <p>Is it possible? Could you help me with ideas how to do it?</p>