Array types are used in declarations and in cast expressions (§15.16).
An array type is written as the name of an element type followed by some number of empty pairs of square brackets
. The number of bracket pairs indicates the depth of array nesting.
An array’s length is not part of its type.
The element type of an array may be any type, whether primitive or reference. In particular:
• Arrays with an interface type as the element type are allowed.
An element of such an array may have as its value a null reference or an instance of any type that implements the interface.
• Arrays with an
abstract class type as the element type are allowed.
An element of such an array may have as its value a null reference or an instance of ...