Sort multiple arrays simultaneously "in place" : <p>I have the following 3 arrays: </p>

<pre><code>int[] indexes = new int[]{0,2,8,5};
String[] sources = new String[]{"how", "are", "today", "you"};
String[] targets = new String[]{"I", "am", "thanks", "fine"};
</code></pre>

<p>I want to sort the three arrays based on the indexes:</p>

<pre><code>indexes -&gt; {0,2,5,8}
sources -&gt; {"how", "are", "you", "today"}
targets -&gt; {"I", "am",  "fine",  "thanks"}
</code></pre>

<p>I can create a new class <code>myClass</code> with all three elements:</p>

<pre><code>class myClass {
    int x;
    String source;
    String target;
}
</code></pre>

<p>Reassign everything to myClass, then sort <code>myClass</code> using <code>x</code>. However, this would required additional spaces. I am wondering if it is possible to do <code>in place</code> sorting? Thanks!</p>
