title: How to sort the string number in descending order?
body: <p>Below is my list which will always be in the form of <code>bXXXX</code> - </p>
  
  <pre><code>List&lt;String&gt; data = Arrays.asList("b5", "b10", "b2", "b1", "b40");
  System.out.println(data);
  </code></pre>
  
  <p>My <code>data</code> list will always have strings in the form of <code>bXXXX</code></p>
  
  <p>Now I need to sort my above lists in descending order and extract the largest string from it.. </p>
  
  <p>So in the above example, it will be <code>b40</code>.. So below is the comparator I am using which sorts everything in ascending order - </p>
  
  <pre><code>static final Comparator&lt;String&gt; aStringComparator = new Comparator&lt;String&gt;() {
      public int compare(String s1, String s2) {
          //assumed input are strings in the form axxxx
          int numfromS1 = Integer.valueOf(s1.subSequence(1, s1.length()).toString());
          int numfromS2 = Integer.valueOf(s2.subSequence(1, s2.length()).toString());
          return numfromS1 - numfromS2;
      }
  };
  </code></pre>
  
  <p>And I am not able to understand how do I make this to sort it out in descending order so that I can extract the first index from the list which will be greatest string number?</p>