I wanted to print sorted Polish names of all available languages.
import java.util.*; public class Tmp { public static void main(String... args) { L
You should pass a Collator to the sort method:
// sort according to default locale Collections.sort(langs, Collator.getInstance());
The default sort order is defined by the Unicode codepoints in the string, and that's not the correct alphabetical order in any language.