An array variable is declared the same way that any Java variable is declared. It has a type and a valid Java identifier. The type is the type of the elements contained in the array. The [] notation is used to denote that the variable is an array. Some examples:
Java Example
int[] counts;
String[] names;
int[][] matrix;
Here, we declare three arrays. The first is an array of integers. The second is an array of Strings. The third is actually an array of integer arrays.