<<< Comparing Strings, equalsIgnoreCase( ) | Index | An empty String >>> |
if ( aWord.compareTo( anotherWord ) < 0 ) { //... }
The compareTo() method compares two Strings and returns:
Zero if two Strings refer to the same value
Negative number if calling object is less than the argument object
Positive number if calling object is greater than the argument object
<<< Comparing Strings, equalsIgnoreCase( ) | Index | An empty String >>> |