title: Java ArrayList sort two lists in same order
body: <p>I have two ArrayLists in Java. Both lists are unsorted. </p>
  
  <pre><code>    ArrayList&lt;Integer&gt; listOne = new ArrayList&lt;&gt;();
      listOne.add(2);
      listOne.add(1);
      listOne.add(4);
      listOne.add(8);
      listOne.add(6);
  
      ArrayList&lt;String&gt; listTwo = new ArrayList&lt;&gt;();
      listTwo.add("ant");
      listTwo.add("bear");
      listTwo.add("cat");
      listTwo.add("dog");
      listTwo.add("zebra");
  </code></pre>
  
  <p>I want to sort listOne in natural order and each item of listTwo should be sorted according to the position in listOne:  </p>
  
  <p>What I have so far is: </p>
  
  <pre><code>  Collections.sort(listOne);
  
    for (int i = 0; i &lt; listOne.size(); i++) {
  
          int intTest = listOne.get(i);
          String stringTest = listTwo.get(i);
  
          System.out.println(intTest);
          System.out.println(stringTest);
  
      }
  </code></pre>
  
  <p>This prints :</p>
  
  <pre><code>  1 ant, 2 bear, 4 cat , 6 dog , 8 zebra
  </code></pre>
  
  <p>My expected print output is: </p>
  
  <pre><code>  1 bear, 2 ant, 4 cat, 6 zebra, 8 dog
  </code></pre>
  
  <p>So that when the item of listOne "1", that changed the position from 2nd to 1st, the item "bear" in listTwo, that was on the 2nd position, should also print on the 1st position. </p>
  
  <p>What would be the most simple and efficient way to do this? </p>