title: How does compareTo work?
body: <p>I know that <code>compareTo</code> returns a negative or positive result on how well one string correlates to the other, but then why:</p>
  
  <pre><code>public class Test {
      public static void main(String[] args) {
          String y = "ab2";
          if(y.compareTo("ac3") == -1) {
              System.out.println("Test");
          }
      }
  }
  </code></pre>
  
  <p>is true and</p>
  
  <pre><code>public class Test {
      public static void main(String[] args) {
          String y = "ab2";
          if(y.compareTo("ab3") == -1) {
              System.out.println("Test");
          }
      }
  }
  </code></pre>
  
  <p>is also true?</p>