I have a List<String> object that contains country names. How can I sort this list alphabetically?
List<String>
Assuming that those are Strings, use the convenient static method sort…
sort
java.util.Collections.sort(listOfCountryNames)
1.4m articles
1.4m replys
5 comments
56.9k users