I am using the String.compareTo() method for String comparison.
Consider the following code:
String firstLexicon = "0";
String anyString = "anyString";
int result = firstLexicon.compareTo(anyString);
What would be the value for firstLexicon
so that the method firstLexicon.compareTo(anyString);
will always give a negative result for any value except firstLexicon
?
My best guess was "0"
.