1) No memory space is obtained in an empty array, so it cannot be used, and the data must be allocated memory space using the New keyword.
2) cannot be statically initialized and dynamically initialized when initializing an array, Eg:int [3] [3] array2={{1,2,3},{2,3,4},{3,4,5}}; This method is wrong!
3) Use of the arrays class:
A: The copy of the array--is implemented by the static method Copyof (type[] original,int length) of the class arrays, where type can be Boolean,int, short,char,byte!
B: The array's fill--a:fill (type[] A,type b), which indicates that the entire space of array A is filled to B. B:fill (type[] a,int key1,int key2,type b); fills the entire contents of array a from key1 to Key2 to B, but does not contain the location of Key2.
C: Array comparison--the function that implements the comparison is equals (array 1, array 2) if the number of two array data elements is the same as the data element in the same position, then the two arrays are equal, the function range is Boolean true, otherwise false is returned.
D: Array sort--a:sort (array reference) B:sort (array reference, parameter 1, parameter 2)
E: The lookup of the array.
4) Two exceptions commonly found in arrays: a array of angle labels out-of-bounds exception arrayindexoutofboundsexception.
b NULL pointer exception nullpointerexception
Both of these exceptions are run-time exceptions.
5) You can use foreach to iterate through an array using the method for (element type element variable: Traverse object) {executed code}
Array-related issues in Java