title: Sorting 2d string array with integer
body: <p>i created a 2d string array (called data) which contains on the first position an integer (as a string) and on the second position a link to a file.</p>
  
  <p>Examples:</p>
  
  <pre><code>["3", "Test3.pdf"]; ["1", "Test1.pdf"];  ["2", "Test2.pdf"];  ["10", "Test10.pdf"]
  </code></pre>
  
  <p>So now I need to sort the array ascending for the integer. So the result of the sorting should be an sorted array like:</p>
  
  <pre><code>["1", "Test1.pdf"];  ["2", "Test2.pdf"];["3", "Test3.pdf"];["10", "Test10.pdf"]
  </code></pre>
  
  <p>I found some sample code for this:</p>
  
  <pre><code>Arrays.sort(data, new Comparator&lt;String[]&gt;() {
      @Override
      public int compare(final String[] entry1, final String[] entry2) {
          final String time1 = entry1[0];
          final String time2 = entry2[0];
          return time1.compareTo(time2);
      }
  });
  </code></pre>
  
  <p>but the problem is, that in this case it compares it with string logic, so the result would be-> 1,10,2,3. So I cannot archive the result with this. Do you know what can I do? You only can have an 2d array of one type? not mix of string and integer?</p>