(String[] args)
| 31 | return new CompType(r.nextInt(100), r.nextInt(100)); |
| 32 | } |
| 33 | public static void main(String[] args) { |
| 34 | CompType[] a = new CompType[12]; |
| 35 | Arrays.setAll(a, n -> get()); |
| 36 | show("Before sorting", a); |
| 37 | Arrays.sort(a); |
| 38 | show("After sorting", a); |
| 39 | } |
| 40 | } |
| 41 | /* Output: |
| 42 | Before sorting: [[i = 35, j = 37], [i = 41, j = 20], [i |