EMZETT.
Login

Array

In short: An array is an ordered row of values of the same type that are addressed by a number (the index). Counting almost always starts at 0.

In more detail: In memory the elements lie directly one after another. Access by index is therefore very fast (constant time). In many languages (Java, C) the length is fixed after creation.

In detail

int[] numbers = {4, 8, 15};
System.out.println(numbers[0]);      // 4
System.out.println(numbers.length);  // 3
numbers[2] = 16;

See also: Index, Arrays