First, the concept of arrays
Definition: An array is a collection of multiple elements that store the same data type.
Arrays can store either the base data type or the reference data type.
Format:
Format 1: Data type [] array name;
Format 2: Data type array name [];
This is done, but there are no elements in the array, we must initialize the arrays.
Ii. Initialization of arrays
The Java array must be initialized before it can be used. The so-called initialization is to allocate memory space for the elements of the array and assign values to each array element.
Dynamic initialization: Only the length of the array is specified when initializing, and the initial value is assigned by the system array.
Static initialization: The initialization value specifies the initial value of each array element, and the system determines the length of the array.
Java Basic Learning (ii)-arrays