<<< Two-dimensional arrays, cont. | Index | Two-dimensional arrays and the instance variable length >>> |
The syntax for referring to an element of a rectangular array
arrayName[rowIndex][columnIndex]
The indexes for a 3x2 array
[0][0] [0][1] [1][0] [1][1] [2][0] [2][1]
Code that assigns values to the array
numbers[0][0] = 1; numbers[0][1] = 2; numbers[1][0] = 3; numbers[1][1] = 4; numbers[2][0] = 5; numbers[2][1] = 6;
<<< Two-dimensional arrays, cont. | Index | Two-dimensional arrays and the instance variable length >>> |