title: How to compare last two letters of a string in alphabetical order in Java?
body: <p>I am having a problem comparing last two alphabetic letters of a single string in alphabetical order. I know how to compare two strings alphabetically using <code>compareTo()</code> string function but no idea about this.</p>
  
  <p>This is what I have to do :</p>
  
  <p>Method <code>isIncreasing()</code> to check whether the given string is an increasing  string or not. It is increasing if, while moving from Left to Right, each character in the string comes after the previous character in the alphabetical order.</p>
  
  <p>Example: <code>ANT</code> is an increasing string whereas <code>APPLE</code> is not.</p>