The concept of the 1{array:
An array is a collection of variables of the same type, which can be referenced using a common name. Arrays can also be defined as any type, either one-dimensional or two-dimensional. The array is accessed by its corresponding subscript. Arrays provide a way to facilitate grouping of connected information;}
2{one-dimensional arrays:
A one-dimensional array is actually a set of lists of the same variables. To create an array, you must first define the variable types of the arrays, using the declaration format of the one-dimensional array as:
Array type array name "";}
3{steps to create an array:
1: declaring an array;
2: Create space for an array
3: When the array is an object, it must be created and initialized with the arrays before use;}
There are three ways to create a one-dimensional array of 4{:
1: first declaration after creation;//int myarray[]; MyArray = new INT[10];
2: Simultaneous creation of the Declaration;//int myarray[] = new int [10];
3: Direct assignment;//int myarray[] ={1,2,3,4,5,6,7,7,8,9}
}
5{when declaring an array, there is no space for the arrays to open up for storage, and it must be initialized for it to allocate space for it:
There are two ways to initialize: The first is direct assignment, the second is to use new to initialize the array, and when you use the keyword new, only the array is opened up but not assigned a value;}
Common operations for 6{java arrays:
Defines a Java array://string [] aarray = new String [5];
The memory structure of a one-dimensional array of Java in data structure and its characteristics