sorting an array List : <p>i am trying to sort an list array that has Strings that contain Integers and letters but when i do it the regular way i get some wierd output:
relevant code:</p>

<pre><code>List&lt;String&gt; words = new ArrayList&lt;&gt;();  
words.add("9 hello");
words.add("98 food");
words.add("105 cat");
words.add("2514 human");
words.add("3 pencil");
words.sort(Comparator.reverseOrder());
</code></pre>

<p>i am expecting :</p>

<pre><code>"2514 human"
"105 cat"
"98 food"
"9 hello"
"3 pencil"
</code></pre>

<p>but i am getting something like this:</p>

<pre><code>"98 food"
"9 hello"
"3 pencil"
"2514 human"
"105 cat"
</code></pre>

<p>any suggestions?</p>
