Why is the same character compared twice by changing its case to UPPER and then to lower?
问题 The below code is in Class String in java. I don't understand why the characters from two different strings are compared twice . at first by doing upper case and if that fails by doing lower case. My Question here is, is it required? If yes, why? public static final Comparator<String> CASE_INSENSITIVE_ORDER = new CaseInsensitiveComparator(); private static class CaseInsensitiveComparator implements Comparator<String>, java.io.Serializable { // use serialVersionUID from JDK 1.2.2 for