a = new int[20];This instructs the operating system to find consecutive storage for 20 integers and place a reference to that block of memory in the variable a. This is sometimes known as allocating the array. Note that the operations of declaration and allocation can be done together as in
int[] a = new int[20];Either way, elements of the array can now be accessed by index as in
a[2] = 173;which assigns the integer 173 to the array element 2. Elements can also be accessed using an index variable as in a[i]. The variable i must be of type byte, short or int, but int is the most common.