go to home page   go to next page

created: 12/03/99; revised: 01/24/00, 07/20/02, 05/30/03, 02/03/06, 08/16/14

CHAPTER 49C — Two-Dimensional Arrays

Chapter Topics:

Often data comes naturally in a two dimensional form. Web browser screens are two dimensional, as are spreadsheets, printed pages, and images.

For many of these situations you need a two-dimensional array. This is a collection of cells laid out in a 2D grid, like graph paper. Each cell can hold a value (as with a 1D array). However, now two indexes are needed to specify a cell.

If you have ever used a spreadsheet then you have used a 2D grid for holding and manipulating data.

One programming problem in the 2014 Advanced Placement test for computer science required use of a two dimensional array of object references.


(Thought question: ) Do you suspect that 2D arrays in Java are objects?