# Two-dimensional arrays

Programming basics[1]

Like a 1D array, a 2D array is a collection of data cells, all of the same type, which can be given a single name. However, a 2D array is organized as a matrix with a numberA unit of abstract mathematical system subject to the laws of arithmetic. of rows and columns.[2]

Daniel Shiffman[3] writes: an array keeps track of multiple pieces of information in linear order, a one-dimensional listGive a sequence of brief answers with no explanation.. However, the data associated with certain systems (a digital image, a board game, etc.) lives in two dimensions. To visualize this data, we need a multi-dimensional data structure, that is, a multi-dimensional array. A two-dimensional array is really nothing more than an array of arrays (a three-dimensional array is an array of arrays of arrays). Think of your dinner. You could have a one-dimensional listGive a sequence of brief answers with no explanation. of everything you eat:

(lettuce, tomatoes, steak, mashed potatoes, cake, ice cream)

Or you could have a two-dimensional listGive a sequence of brief answers with no explanation. of three courses, each containing two things you eat:

(lettuce, tomatoes) and (steak, mashed potatoes) and (cake, ice cream)

## a good video

This video has some references to Java, but it should help you understand the very basics of 2d arrays : https://www.youtube.com/watch?v=nySZfYSVspo

## Standards

• ConstructDevelop information in a diagrammatic or logical form. algorithms using pre- defined sub-programmes, one- dimensional arrays and/or collections.