title: Using compareTo to compare strings of numbers isn't working as planned, how do i fix this?
body: <p><img src="https://i.stack.imgur.com/88OFH.png" alt="The app itself running to show my issue"></p>
  
  <p>So i am trying to get it so that it orders this list from highest value to lowest value by using the 2nd column of the 2d string array.</p>
  
  <p>By looking online the answer seemed to be simple all i had to do was make my own comparator.</p>
  
  <p>Which looks like this in the code</p>
  
  <pre><code>        Arrays.sort(stockPriceAndNameSorted, new Comparator&lt;String[]&gt;() {
          @Override
          public int compare(final String[] entry1, final String[] entry2) {
              return entry1[1].compareTo(entry2[1]);
          }
      });
  </code></pre>
  
  <p>But as you can see it is not being ordered as it should, if for example i give it the values, 1,2,3,4,5 it works fine. Change that to 1,11,3,4,5 however and it doesn't work as it should.</p>