public class MyClass {
public static void main(String args[]) {
int[][] array = {{1, 2, 3, 18}, {4, 5, 6, 27}, {7, 8, 9, 99}};
int rows = array.length;
int cols = array[0].length;
for(int i = 0; i < rows; i++) {
for(int j = 0;j < cols; j++) {
System.out.print(array[i][j] + " ");
}
System.out.println();
}
}
}
/*
run:
1 2 3 18
4 5 6 27
7 8 9 99
*/