Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and medical aesthetics - How to initialize array in java
How to initialize array in java

1 Dynamic initialization: Array definition is performed separately from the operations of allocating space and assigning values ??to the array;

2. Static initialization: Allocating space and assigning values ??to array elements is done while defining numbers. ;

3. Default initialization: The array is a reference type, and its elements are equivalent to the member variables of the class. Therefore, after the array allocates space, each element is also initialized according to the rules of member variables.