import java.util.ArrayList;
import java.util.Collections;
import java.util.Arrays;
public class MyClass {
public static void main(String args[]) {
ArrayList<Integer> al = new ArrayList<>(Arrays.asList(40, 89, 23, 99, 89, 75, 30, 12));
System.out.println(al);
Collections.sort(al, Collections.reverseOrder());
System.out.println(al);
}
}
/*
run:
[40, 89, 23, 99, 89, 75, 30, 12]
[99, 89, 89, 75, 40, 30, 23, 12]
*/