Algorithms & Data Structures

Free Version

Upgrade subject to access all content


Properties of Java Arrays


An array is a basic container object for holding data values, commonly referred to as elements of the array. The individual elements of an array can be accessed and modified using an index, an integer which specifies the element's position in the array.

Label the following statements true or false to test your knowledge of arrays.

An array can hold several different types of data.

The length of an array is fixed when the array is created.

If an array has length n, the last element of the array has index n.

A multidimensional array (array of arrays) can not have more than 3 dimensions.

The elements of an array are laid out sequentially in memory.