Skip to content
Quiz · Arrays · lesson 8 of 8

Quiz — the sizes of a 2D array

What does the program print?

JAVA
public class Main {
    public static void main(String[] args) {
        int[][] grid = new int[3][4];
        System.out.println(grid.length + " " + grid[0].length);
    }
}