Summary

Section 7.1, Introduction

  • Arrays are data structures consisting of related data items of the same type. Arrays are fixed-length entities—they remain the same length once they are created, although an array variable may be reassigned the reference of a new array of a different length.

Section 7.2, Arrays

  • An array is a group of variables (called elements or components) containing values that all have the same type. Arrays are objects, so they are considered reference types. The elements of an array can be either primitive types or reference types (including arrays).

  • To refer to a particular element in an array, we specify the name of the reference to the array and the index (subscript) of the element in the array.

  • A program refers to any ...

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.