Skip to content
Marlbridge

AP® Computer Science A · Unit 4 · Topic 4.11

2D Array Creation and Access: Checklist (Computer Science A 4.11)

A self-check for 2D array creation and access: declaring and initialising, using row and column indices, length of rows and columns, default values, and avoiding index errors.

Tick each line when you can do it without looking at the guide. Each line names where it is taught and tested. Revisit the study guide for anything you cannot yet do.

Understanding

  • ☐ I can explain that a 2D array is an array of arrays (study guide: From a list to a table; Figure 2).
  • ☐ I can say which index is the row and which is the column (study guide: Picturing it; practice: Question 2).
  • ☐ I can state the default value for each element type and why a new String array holds null (study guide: Creating a 2D array; practice: Question 6).
  • ☐ I can explain why a row taken with arr[r] is an alias, not a copy (study guide: Rows are references; practice: Question 5).

Skills

  • ☐ I can create a 2D array with new and with an initializer list (study guide: Creating a 2D array; practice: Question 7).
  • ☐ I can read and change an element with [row][col] (study guide: Worked example 1; practice: Question 2).
  • ☐ I can find the number of rows and columns from length (study guide: Reading, writing and measuring; practice: Question 3).
  • ☐ I can write a method that copies a column or checks an index (study guide: Worked example 2; practice: Questions 9 and 10).

Reasoning

  • ☐ I can trace assignments to a grid and write the final table (study guide: Worked example 1).
  • ☐ I can predict an ArrayIndexOutOfBoundsException on either index (practice: Question 4).
  • ☐ I can predict a NullPointerException on a null element (study guide: Worked example 2; practice: Question 6).
  • ☐ I can predict the result of swapping two rows by swapping references (practice: Question 8).

Next: Topic 4.12 2D array traversals.

AP® and Advanced Placement® are trademarks registered by the College Board, which is not affiliated with, and does not endorse, this website. Marlbridge is an independent tuition provider. It is not an authorized AP course provider, an AP school or an exam centre, and these resources are not official College Board materials. Reading them or doing simulations does not meet the laboratory requirement of an AP science course.