How can I sort a List alphabetically?

Assuming that those are Strings, use the convenient static method sort

 java.util.Collections.sort(listOfCountryNames)

Leave a Comment