AP Computer Science Amediummcq1 pt

Which creates a 2D String array with 2 rows and 3 columns?

A.String[][] s = new String[2][3];
B.String[][] s = new String[3][2];
C.String[][] s = new String[2];
D.String[][] s = new String(2, 3);

Explanation

Core Concept

The sizes are rows then columns.

Correct Answer

AString[][] s = new String[2][3];

More Unit 8: 2D Array practice questions

Try a random question →

Practice more AP Computer Science A questions with full explanations

Practice Unit 8: 2D Array Questions →