Complete the code to declare and instantiate a two dimensional array of ints with 4 rows and 5 columns
int[][] numbers = _________________ ; |
new int[4][5] |
|
You have a two dimensional array of ints called matrix. Write a single line of code to put 10 in the first column of the first row. |
matrix[0][0] = 10; |
|
You have a two dimensional array of 5 x 10 ints called matrix. Write a single line of code to put 54 in the last column of the last row. |
matrix[4][9] = 54; |
|
You have a two dimensional array of ints called matrix with an unknown number of rows and columns. Complete the statement to find the number of rows in the array.
int rows = _____________; |
matrix.length |
|
You have a two dimensional array of ints called matrix with an unknown number of rows and columns. Complete the statement to find the number of columns in the array.
int columns = _____________; |
matrix[0].length |
|