Back to Unit

Unit 8: 2D Arrays

AP Computer Science A — Note Packet

0 of 3 blanks filled

Key Terms

2D Array

A data structure that stores elements in a grid-like format, organized by ______ and ______. Instead of one index, you need two.

Declaration

The process of informing Java about the type of elements a 2D array will hold, using ______ square brackets (e.g., `int[][] grid;`).

Instantiation

The process of allocating ______ for a 2D array, specifying the number of ______ and ______, e.g., `grid = new int[3][4];`.

Zero-indexed

The property of arrays where the first element is at index ______, meaning a 3-row array has valid row indices from 0 to ______.

Nested Loops

A common control structure used to ______ every element in a 2D array, typically with an outer loop for ______ and an inner loop for ______.

1 / 5