<<< Arrays.equals | Index | Arrays.sort and Arrays.binarySearch >>> |
Code that uses the sort method
int[] numbers = {2,6,4,1,8,5,9,3,7,0}; Arrays.sort(numbers); for (int num : numbers) { System.out.print(num + " "); }
The console output
0 1 2 3 4 5 6 7 8 9
<<< Arrays.equals | Index | Arrays.sort and Arrays.binarySearch >>> |