2-dimensional arrays are usually represented with a row-column "spreadsheet" style. Assume we have an array, a, with two rows and four columns.
int[][] a = new int[2][3]; // Two rows and three columns.
| Two-dimensional arrays are usually visualized as a matrix, with rows and columns. This diagram shows the array a with its corresponding subscripts. |
No comments:
Post a Comment