1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
public class MultidimensionalArrayExample {
public static void main(final String[] args) {
final int[][] ar = new int[10][10];
for (int i = 0; i < ar.length; ++i) {
for (int j = 0; j < ar[i].length; ++j) {
ar[i][j] = i * 10 + j;
}
}
for (int i = 0; i < ar.length; ++i) {
for (int j = 0; j < ar[i].length; ++j) {
System.out.print(ar[i][j] + " ");
}
System.out.print("\n");
}
}
}
Enter to Rename, Shift+Enter to Preview