What is an array?
can store any number of data of the same type.
Declaration of the array: data type [] variable name;
Assignment of the array: variable name =new data type [length];
Merge writing: data type [] variable name =new data type [length];
The array must be the same as the type, and each array item has a number: called an index or subscript.
The index (subscript) of an array is a number of type int.
The index (subscript) starts at 0, and in turn is the number of each item in the array.
The default value of an array item: The value of an array item after it is created, and the default value for the array item type.
A numeric type with a default value of 0;
BOOL type, the default value is false;
Char type, default value is;
String type, the default value is null (empty meaning).
Reading of array items: variable name [index];
From the specified array, the value of an array item is fetched by number, and the return type is the same as the array item type.
Modification of array Item: variable name [index]= value;
Read array length: variable name. Length
Learning about arrays