Now that you have an understanding of the primitive types, let's turn our attention to one of the reference types. Recall the three reference types in Java:
Classes and interfaces are complex enough to earn their own chapters, but arrays are comparatively simple, so they are covered here with the primitive types.
An array is simply a way to maintain a sequence of items. Arrays are objects that hold a fixed number of variables of the same type. Arrays can hold primitive types, other objects, or even references to other arrays. If you have data that can be easily indexed and the number of data elements is known in advance, you should definitely consider using an array. Alternatives to arrays are described in Chapter ...