Collections.sort(testList);
Collections.reverse(testList);
That will do what you want. Remember to import Collections
though!
More Related Contents:
- How do I remove repeated elements from ArrayList?
- Sorting an ArrayList of objects using a custom sorting order
- How to sort an ArrayList in Java [duplicate]
- In Java how do you sort one list based on another?
- How to randomize two ArrayLists in the same fashion?
- How can I sort a List alphabetically?
- How to sort an ArrayList using multiple sorting criteria?
- Java List Sorting: Is there a way to keep a list permantly sorted automatically like TreeMap?
- Removing Duplicate Values from ArrayList
- ArrayList vs LinkedList from memory allocation perspective
- How to remove common values from two array lists
- How to arrange the datas to display in array by given string of days in java?
- When to use LinkedList over ArrayList in Java?
- Convert list to array in Java [duplicate]
- How do you cast a List of supertypes to a List of subtypes?
- How to find an object in an ArrayList by property
- Java List.add() UnsupportedOperationException
- Sorting arraylist in alphabetical order (case insensitive)
- How do I convert a Map to List in Java?
- How to sort an arraylist of objects by a property?
- Define a fixed-size list in Java
- How to shuffle an ArrayList [duplicate]
- How to search in a List of Java object
- Best way to create a hashmap of arraylist
- How to remove element from ArrayList by checking its value?
- ArrayList Vs LinkedList
- Java Sort List of Lists
- Why can’t you have a “List” in Java? [duplicate]
- Does the capacity of ArrayList decrease when we remove elements?
- How to sort Arraylist of objects