Two-dimensional array,
The two-dimensional array can be understood as an array, that is, a one-dimensional array is stored in a one-dimensional array.
Format 1: int [] [] arr = new int [2] [3];
The two-dimensional array of arr has two one-dimensional arrays. The size of each one-dimensional array is 2.
Arr [0] indicates the first one-dimensional array, and arr [0] [0] indicates the first lower value of the first one-dimensional array.
Format 2: int [] [] arr = new int [2] [];
The two-dimensional array of arr has two one-dimensional arrays, but the length of the one-dimensional array is not fixed,
Therefore, you need to initialize the array before use. For example: arr [0] [0] = new int [3]; arr [0] [1] = new int [4]; the remaining is omitted.
(Arr [0] stores the int [3] address, and the initialized array length can be different.) If not initialized, the default value is null.
Format 2: int [] [] arr = {1, 2, 3}, {4, 5}, {6, 7, 8}; initialize the array directly