type varname[]
The most common way to declare an array is the same as in the C language. You declare an array variable with elements of type 'type'.
type[] varname
The alternative way for declaring an array is also the same as the C language. You declare an array variable with elements of type 'type'. In this way, the array notation is suffixed to the 'type'.
new type[numElements]
New array object with elements of type 'type'
Recent comments