import java.util.Arrays; public class Three { public static void main(String[] args) { int num[][] = { {5, 4, 45, 12}, {7, 5, 8, 85}, }; Arrays.sort(num); for(int row = 0; row<2; row++){ for(int col = 0; col<4; col++){ System.out.print(num[row][col]); } } } }
Gives an error message. The one-dimensional array was thus sorted, what is wrong?