Array
1. The concept of array is simply that array can store multiple data of the same type at the same time, and can operate these variables uniformly.
2. Key features (1) Same type (2) Length
3. Basic process of using array: Declaration: specify the type of data to be stored and the name of array; Allocate space: specify the length of array and use the data in array
4. Write a declaration array: Specify the type of stored data and the name of the array. Data type [] Array name; (Suggested writing) can also be written as: Data type [] array name; Data type array name [];
5. Allocate space: specify the length of the array.Array name =new data type [length]; Note: The array cannot be used until the length is specified.
Example:
