Answer the question
In order to leave comments, you need to log in
Is there an alternative to the compareToIgnoreCase method?
Good afternoon!
When applying the compareToIgnoreCase method to strings:
String1 = "AAA";
String2 = "ААА1";
String1. compareToIgnoreCase(String2) // результат отрицательный (-975) то есть String2 идет лексикографически раньше String1.
Answer the question
In order to leave comments, you need to log in
String.CASE_INSENSITIVE_ORDER.reversed().compare("AAA", "AAA1")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question