Java: How do you sort an ArrayList in descending order? There can be 2 scenarios to shot the ArrayList. (1) Sort the ArrayList which contains the in build types like Long, String,Integer ect. (2) Sort ArrayList which contains the custom type. Let's say List of Student class and you want to sort by name. See the code for both scenario. (1) Sort List of inbuilt types import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class ArrayListSort1 { public static void main(String[] args) { List list = new ArrayList<>(Arrays.asList(new Long[] { 50l, 4l, 10l, 1l, 2l, 3l })); System.out.println("Before Short"); System.out.println(list); System.out.println("After Short"); list.sort(Collections.reverseOrder()); System.out.println(list); } } You can see the output as below: Before Short [50, 4, 10, 1, 2, 3] After Short [50, 10, 4, 3, 2, 1] ...