AP Computer Science Aeasymcq1 pt
Which declaration creates a 2D array with 2 rows and 5 columns?
A.int[][] a = new int[2][5];
B.int[][] a = new int[5][2];
C.int[2][5] a;
D.int[][] a = new int[2, 5];
The row size is first.
Aint[][] a = new int[2][5];
Practice more AP Computer Science A questions with full explanations
Practice Unit 8: 2D Array Questions →