zuai-logo
zuai-logo
  1. AP Computer Science A
FlashcardFlashcardStudy GuideStudy GuideQuestion BankQuestion Bank
GlossaryGlossary

2D Arrays in AP Computer Science A

Question 1
college-boardComputer Science AAPExam Style
1 mark

Which of the following is the correct double-index notation to access the element in the third row and second column of a 2D array named "arrayG"?

Question 2
college-boardComputer Science AAPExam Style
1 mark

What exception is thrown if you use an index that is out of the allowed range in a 2D array?

Question 3
college-boardComputer Science AAPExam Style
1 mark

Which of the following statements is true regarding 2D arrays?

Question 4
college-boardComputer Science AAPExam Style
1 mark

Which of the following statements is true regarding 2D arrays?

Question 5
college-boardComputer Science AAPExam Style
1 mark

Which of the following statements about 2D arrays is FALSE?

Question 6
college-boardComputer Science AAPExam Style
1 mark

How would you initialize a pre-existing 2D array with the values: {1, 2, 3, 4} in the first row, {5, 6, 7, 8} in the second row, and {9, 10, 11, 12} in the third row?

Question 7
college-boardComputer Science AAPExam Style
1 mark

In the memory representation of a 2D array, the outer array contains:

Feedback stars icon

How are we doing?

Give us your feedback and let us know how we can improve

Question 8
college-boardComputer Science AAPExam Style
1 mark

What is the result of the following code snippet? int[][] arrayE = {{1, 2, 3}, {4, 5, 6}}; System.out.println(arrayE.length);

Question 9
college-boardComputer Science AAPExam Style
1 mark

Which of the following statements is true regarding 2D arrays?

Question 10
college-boardComputer Science AAPExam Style
1 mark

What is the correct way to declare an empty 2D array with 2 rows and 3 columns of strings?