1.case without break will have penetration effect, according to Ali specification, is strictly forbidden to omit the default statement, even if it does not have a word
2.for Loop Execution order :
for (initialization 1; condition 2; iterative operation 3) {
Circulation Body 4;
}
1->2->4->3->2->4->3 ...
3. Arrays of several small dots
Arrays are supported in the form of int a[][] or even int []a[], but based on readability, it is strictly forbidden to use the form outside of int[][] a
Also, you cannot specify the length of an array declaration in Java, only after new (inverse: int a[5])
An irregular two-dimensional array (the specified row does not specify a column), each element is a one-dimensional array, and the length is self-defined.
Also, Java implements a true array (interpreted from Baidu)
True array:
Continuously allocated in memory.
The memory space in the array is private and avoids the problem of overwriting the data.
The type stored in the array is deterministic, the only
Java to the next bidding clubs check (out of bounds will produce an exception, resulting in overwriting the data, so there is: Java implemented a true array, to avoid the data overwrite)
4. Modifier permission Range (4 3 2 1 decrement)
This kind of package (including sub-category) different Bun class outside
Public 1 1 1 1
Protected 1 1 1 0
Default 1 1 0 0
Private 1 0 0 0
1 of which are accessible, 0 are not accessible
5,
i++ and ++i Java uses the intermediate cache variable mechanism:
i=i++ the same as:
temp=i (I on the right side of the equals sign)
i=i+1; (I on the right side of the equals sign)
i=temp; (I on the left of the equals sign)
and I=++i is equivalent to:
i=i+1;
temp=i;
i=temp;
understand the i=i++;i=++i;
Java Fundamentals-Basic syntax Note