(String[] args)
| 9 | |
| 10 | public class Reverse { |
| 11 | public static void main(String[] args) { |
| 12 | CompType[] a = new CompType[12]; |
| 13 | Arrays.setAll(a, n -> CompType.get()); |
| 14 | show("Before sorting", a); |
| 15 | Arrays.sort(a, Collections.reverseOrder()); |
| 16 | show("After sorting", a); |
| 17 | } |
| 18 | } |
| 19 | /* Output: |
| 20 | Before sorting: [[i = 35, j = 37], [i = 41, j = 20], [i |