access 2d array java code example
Example 1: accessing 2d array in java
(m x n matrix) - (2 x 3 matrix)
m n ------------------ >
| a[0][0] a[0][1] a[0][2]
v a[1][0] a[1][1] a[0][2]
Example 2: two dimensional array in java example program
int[][] a = new int[3][4];
Example 3: declaring 3d arrays
int test[2][3][4] = {
{{3, 4, 2, 3}, {0, -3, 9, 11}, {23, 12, 23, 2}},
{{13, 4, 56, 3}, {5, 9, 3, 5}, {3, 1, 4, 9}}}