Assuming that those are Strings, use the convenient static method sort
…
java.util.Collections.sort(listOfCountryNames)
More Related Contents:
- How to sort a List/ArrayList?
- Java List Sorting: Is there a way to keep a list permantly sorted automatically like TreeMap?
- How do I remove repeated elements from ArrayList?
- Sorting an ArrayList of objects using a custom sorting order
- How do you cast a List of supertypes to a List of subtypes?
- Sorting a collection of objects [duplicate]
- How to sort an ArrayList in Java [duplicate]
- Sort Java Collection
- How to remove duplicates from a list?
- In Java how do you sort one list based on another?
- How to randomize two ArrayLists in the same fashion?
- Sorted collection in Java
- Java 8 stream reverse order
- How do I convert a Map to List in Java?
- How to sort an arraylist of objects by a property?
- How to sort an ArrayList using multiple sorting criteria?
- Define a fixed-size list in Java
- Why does Collections.sort use Mergesort but Arrays.sort does not?
- How to shuffle an ArrayList [duplicate]
- How to search in a List of Java object
- Sort a List of objects by multiple fields [duplicate]
- How to sort a Collection?
- Is there a no-duplicate List implementation out there?
- Removing Duplicate Values from ArrayList
- Create a List of primitive int?
- Java Sort List of Lists
- Sort List of Strings with Localization
- How to flatten all items from a nested Java Collection into a single List?
- Why Collections.sort uses merge sort instead of quicksort?
- Performance and Memory allocation comparison between List and Set