I\'m trying to make a program that consists of an array of 10 integers which all has a random value, so far so good.
However, now I need to sort them in order from l
For natural order : Arrays.sort(array)
Arrays.sort(array)
For reverse Order : Arrays.sort(array, Collections.reverseOrder()); -- > It is a static method in Collections class which will further call an inner class of itself to return a reverse Comparator.
Arrays.sort(array, Collections.reverseOrder());