how to sort ArrayList lexicographically using functions of collection interface ?
How to sort ArrayList lexicographically using functions of collection interface?
For ascending order, you could use Collections.sort(myList) and for sorting in descending order use Collections.sort(myList, Collections.reverseOrder())