1: Array Description
Arrays are special types in the Java language. They store a series of objects that can be referenced by index, and you can define arrays of arrays, and here are some examples:
int i[];
Char c[];
float f[][];
2: Array operators
In Java, an array is allocated by using the new operator to create an array and then assign it to a variable, such as:
int i[]=new int[10];
The previous example creates an array of 10 integer variables and assigns it to I, and you will get the variable i[0],i[1],......,i[8],i[9 in numerical order, noting that the subscript starts with 0 of the first element and the number of the array minus 1.
The use of an array is the same as a variable, and each member of the array can be used where the same variable is used, and Java also supports multidimensional arrays.
Char C[][]=new char[10][10];
float f[][]=new float[5][];
Note In the second note only one-dimensional dimensions are determined, and Java requires that at least one dimension of the scale is determined at compile time (i.e. in the source code), and the dimensions of the remainder can be allocated later.
Arrays are used primarily for the fact that you have a large number of related data that you want to store together and that you can simply access them by numbers, which is very powerful.