Unit 4 · Data Collections
2D Array Basics
2D Array Basics MCQ Practice
Question 1 of 15
Answered 0 of 15
Choose one answer.
What is printed by the following code segment?
public class GridArrayBasicsContext
{
public static void runExample()
{
int[][] g = new int[2][3];
g[1][2] = 5;
System.out.print(g.length + " " + g[0].length
+ " " + g[1][2]);
}
public static void main(String[] args)
{
runExample();
}
}