Arrays are data structures that store either values of a primitive data type or object references in a contiguous storage area. Array creation is shown as follows for numbers of type
int and in two variants for names of type
String. In the latter case, the shorthand notation and syntactic feature of direct initialization are used, where the size of the array is automatically determined by the compiler by the number of specified elements.
int[] numbers = new int[100]; // definition without data
String[] names1 = new String[] ...