Arrays don't grow automatically.
The last valid index of an array A is A.length - 1
ArrayIndexOutOfBoundsException will be thrown if you try to simply insert a new value into an array beyond the last valid index.
The Java ArrayList type overcomes this limitation.
However, ArrayList is not an "array". You can't use an index to access elements of an ArrayList.
Instead you must use the methods in the ArrayList class.
The elements stored in an ArrayList must be a reference type.