February 2014
Beginner
1248 pages
62h 25m
English
• An array is a group of variables (called elements or components; p. 245) containing values that all have the same type. Arrays are objects, so they’re considered reference types.
• A program refers to any one of an array’s elements with an array-access expression (p. 245) that includes the name of the array followed by the index of the particular element in square brackets ([]; p. 245).
• The first element in every array has index zero (p. 245) and is sometimes called the zeroth element.
• An index must be a nonnegative integer. A program can use an expression as an index.
• An array object knows its own length and stores this information in a length instance variable (p. 246).
Read now
Unlock full access