title: What does the String classes compareTo() method return
body: <p>In the Java API on oracles <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#compareTo%28java.lang.String%29" rel="nofollow">website</a>: "compareTo Returns: "the value 0 if the argument string is equal to this string; a value less than 0 if this string is lexicographically less than the string argument; and a value greater than 0 if this string is lexicographically greater than the string argument." "</p>
  
  <p>Here is an if statement:</p>
  
  <pre><code>String a = "abd";
  String b = "abc";
  
  if(a.compareTo(b) &gt;= 1)
  </code></pre>
  
  <p>returns true
  since string a is greater, lexicographically.</p>
  
  <p>My question is, does the compareTo always return a 0, 1, or -1? or does it return the actual <em>amount</em> that the string is greater than or less than the string argument.</p>
  
  <p>So in the above if statement, since "abd" is one greater than "abc" is it returning 1?</p>