2 Matching Annotations
- Sep 2018
The numbers variable can reference an array of int values. Notice that this statement looks like a regular int variable declaration except for the set of brackets that appears after the key word int. The brackets indicate that this variable is a reference to an int array.
What differentiates an array variable from a regular variable is the set of brackets i.e 
As with any other type of object, it is possible to declare a reference variable and create an instance of an array with one statement. Here is an example:int numbers = new int;Arrays of any data type can be declared. The following are all valid array declarations:float temperatures = new float;char letters = new char;long units = new long;double sizes = new double
The arrays can have any data type e.g. char, string