PPT Slide
The length field of an array object makes
the length of the array available.
Java supports arrays of arrays, rather than
2D or multi-dimensional arrays.
public static void main (String[] args) {
double[] [] mat = {{1., 2., 3., 4.}, {5., 6., 7., 8.},
{9., 10., 11., 12.}, {13., 14., 15., 16.}};
for (int y = 0; y < mat.length; y++) {
for (int x = 0; x < mat[y].length; x++)
System.out.print(mat[y][x] + " ");
Is the array stored in row-major or column-major