The JavaTM Tutorial

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form

Trail: Learning the Java Language
Lesson: Object and Data Basics

## Arrays

> An array is a structure that holds multiple values of the same type. The length of an array is established when the array is created (at runtime). After creation, an array is a fixed-length structure.

> [PENDING: draw a picture, needs to show "element" and "index"]

> An array element is one of the values within an array and is accessed by its position within the array.

> If you want to store data of different types in a single structure, or if you need a structure whose size can change dynamically, use a `Collection` implementation, such as `Vector`, instead of an array. Refer to Collections for a complete trail on the subject. This section covers these array-related topics:

> - Creating and Using Arrays
> - Arrays of Objects
> - Arrays of Arrays
> - Copying Arrays
> - Summary of Arrays
> - Questions and Exercises: Arrays

| Start of Tutorial > Start of Trail > Start of Lesson | Search Feedback Form