compareTo( ) in Java - Java samples - Programming tutorials on Java, C, C++, PHP, ASP
Often, it is not enough to simply know whether two strings are identical. For sorting applications, you need to know which is less than, equal to, or greater than the next. A string is less than another if it comes before the other in dictionary order. A ...