17EXPANDING TO HIGHER-DIMENSION ARRAYS
In the previous two chapters, you learned how to use one-dimensional arrays to store collections of items. In this chapter, we’ll expand this concept to two dimensions and higher. Working in more than one dimension is also called working in higher dimensions.
In a two-dimensional (2D) array, you can store values in a table or a grid. For example, think about the scoreboard at a baseball game (see Figure 17-1). The left column lists the team names, and the right columns list the innings and other statistics.
Figure 17-1: Baseball scoreboard
The arrays you’ll make in this chapter are similar to a scoreboard. ...