import java.util.Arrays;
import java.util.Collections;
public class MyClass {
public static void main(String args[]) {
Integer[] arr = new Integer[] {5, 3, 7, 1, 5, 2, 9, 8};
Arrays.sort(arr, Collections.reverseOrder());
System.out.println(Arrays.toString(arr));
}
}
/*
run:
[9, 8, 7, 5, 5, 3, 2, 1]
*/