Array

An array is a numerically indexed collection of elements holding values.

Related concepts:  TypeValue

Closest Wikipedia entry:  Array data type — In computer science, array is a data type that represents a collection of elements (values or variables), each selected by one or more indices (identifying keys) that can be computed at run time during program execution. Such a collection is usually called an array variable or array value. By analogy with the mathematical concepts vector and matrix, array types with one and two indices are often called vector type and matrix type, respectively.

Misconceptions about Array
23 documented Misconceptions

Check Yourself
Misconception
ArrayAccessWithParenthesesJava
Parenthesis are used to access an element in an array
Misconception
ArrayAllocationWithoutNewJava
Arrays are created without the new keyword
Misconception
ArrayBracketCountIsLengthJava
The number of brackets in an array type or an array initializer corresponds to the length of the array
Misconception
ArrayElementTypeRepeatsJava
The type of a multi-dimensional array is written as T[] T[] T[]
Misconception
ArrayElementsUntypedJava
Elements of arrays are untyped
Misconception
ArrayHasLengthMethodJava
To get the length of an array, one needs to call its length method
Misconception
ArrayInitializerContentsInBracketsJava
Array initializers list the elements in square brackets
Misconception
ArrayLengthCannotBeZeroJava
An array cannot have a length of 0 elements
Misconception
ArrayLengthPartOfTypeJava
The length of an array is part of its type
Misconception
ArrayListIsArrayJava
ArrayLists are arrays
Misconception
ArrayRankIsLengthJava
Array rank and array length are the same thing
Misconception
ArrayRankNotPartOfTypeJava
The rank of an array is not part of its type
Misconception
ArraysGrowJava
Arrays can grow dynamically
Misconception
ForEachIteratesOverIndicesJava
An enhanced for loop iterates over the indices of an array or a collection
Misconception
ForEachVariableIsElementJava
One can assign to the variable of an enhanced for statement to store a value in the corresponding array or collection element
Misconception
ListLengthCannotBeZeroScratch
A list cannot have a length of 0 items
Misconception
ListsHomogeneousScratch
All items in a list must have the same type
Misconception
MapInPlaceJavaScript
Map modifies the elements of the array on which it operates in place
Misconception
MultidimensionalArrayJava
A multi-dimensional array is one thing
Misconception
NoJaggedArraysJava
Multi-dimensional arrays have a rectangular shape
Misconception
OnlyInnermostArrayElementsJava
Only the elements of the innermost array of a multi-dimensional array are accessible
Misconception
OutOfBoundsElementsAreNullJava
Out-of-bounds array elements are null
Misconception
TypeofArrayIsArrayJavaScript
The typeof operator applied on an array returns 'array'

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.