Earlier Video we shared the examples of ArrayList sorting in ascending order. Here we will learn how to sort an ArrayList in descending (or decreasing) order.
We are using Collections.reverseOrder() method along with Collections.sort() in order to sort the list in decreasing order. In the below example we have used the following statement for sorting in reverse order.
Collections.sort(arraylist, Collections.reverseOrder());
#programminggalaxy #arraylistinjava
#arraylist #arraylistshortinjava