The difference between break and continue:
Break is the end of this layer loop or used in a switch statement to end the current case;
Continue end this cycle
for (int i=0;i<9;i++) {
System.out.println (i+ "---------");
Break
}
The first cycle is over;
for (int i=0;i<9;i++) {
if (i=5) {
Continue
}
System.out.println (i+ "---------");
}
In the i==5, jump out of this cycle, and then loop on.
Array-Related:
Two special cases of arrays: length 0;
Two common exceptions to arrays: Index out-of-bounds exceptions and null pointer exceptions;
The static modifier is related to:
The This keyword cannot be used in a static method, because the static method belongs to the class, and this is the following object;
Static access is only static, access is direct access, calls are unrestricted, non-static can be accessed;
Static code block: Initializes the class and loads only once;
Execution order in program: Static code block--Construction code block--construction method
Static code block: Execute only once
Java Learning Note day09