← Quiz: Java Arrays: all 10 questions
Quiz: Java Arrays · Question 5 of 10
What does grid.length give for int[][] grid = new int[3][5];?
What does grid.length give for int[][] grid = new int[3][5];?
- A.3
- B.5
- C.15
- D.8
Answer & explanation
Correct answer: 3
grid.length is the number of rows (3); grid[0].length is the number of columns (5).
Can you get the rest right without peeking?
Take the timed Quiz: Java Arrays quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →