How to sort strings using Collator class?
In this example we demonstrate how to use the
java.text.Collator class to sort strings in language-specific order. Using the
java.text.Collator class makes the string not just sorted by the ASCII code of their characters but it will follow the language natural order of the characters.