Back to 2D Arrays

Lesson PreviewLesson 1 of 3 in this unit

8.1 2D Arrays

Part of 2D Arrays in AP® Computer Science A. Read the opening section, then create a free account for the full interactive lesson, practice, and progress tracking.

A two-dimensional array (2D array) is an array of arrays, meaning it organizes data into a table-like structure with rows and columns. Each element in a 2D array is identified using two indices: one for the row and one for the column. Think of a 2D array like a chessboard. The board has rows (horizontal) and columns (vertical), and each square on the board can be identified using a combination of row and column numbers. For example, you could identify a rook at any corner of the board.

Continue the full lesson in Stellar

Create a free account to unlock the remaining sections, checkpoints, course practice, and progress tracking for AP® Computer Science A.