title: Sorting 2D array of strings in Java
body: <p>I know that this question might have been asked before, but I was not able to find a fit answer. So say I have this array:</p>
  <pre class="lang-java prettyprint-override"><code>String[][] theArray = {
          {&quot;james&quot;, &quot;30.0&quot;},
          {&quot;joyce&quot;, &quot;35.0&quot;},
          {&quot;frank&quot;, &quot;3.0&quot;},
          {&quot;zach&quot;, &quot;34.0&quot;}};
  </code></pre>
  <p>Is there a way to descendingly sort this array by the second element of each sub-element. So I would get something like this.</p>
  <pre class="lang-java prettyprint-override"><code>theArray = {
          {&quot;joyce&quot;, &quot;35.0&quot;},
          {&quot;zach&quot;, &quot;34.0&quot;},
          {&quot;james&quot;, &quot;30.0&quot;},
          {&quot;frank&quot;, &quot;3.0&quot;}};
  </code></pre>