Chapter 10. Arrays

In the Java programming language, arrays are objects (§4.3.1), are dynamically created, and may be assigned to variables of type Object4.3.2). All methods of class Object may be invoked on an array.

An array object contains a number of variables. The number of variables may be zero, in which case the array is said to be empty. The variables contained in an array have no names; instead they are referenced by array access expressions that use non-negative integer index values. These variables are called the components of the array. If an array has n components, we say n is the length of the array; the components of the array are referenced using integer indices from 0 to n - 1, inclusive.

All the components of an array have ...

Get The Java® Language Specification, Java SE 8 Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.