Package com. xml. test;
Public class testc {
/**
* If else/If else if difference
* If (){
* If the condition is true, the execution is performed.
*} Else (){
* If the condition is not true, run this command.
*}
*------------------------------------------------------------------------------
* If (){
* If the condition is true, the execution is performed.
*} Else if (){
* If the if statement is not true, the else statement is executed if it is true.
*} Else if (){
* If the preceding else is not true, the first else if is executed. If the else if condition is true, the next else if statement is not executed.
*} Else {
* If none of the above if or else if conditions are true, the last else block is executed.
*}
*/
Public static void main (string [] ARGs ){
Int A = 100;
If (A & gt; 1000 ){
System. Out. println ("Great, I can buy Audi Q7 ");
} Else if (a> 500 ){
System. Out. println ("oh, I can buy Audi Volvo cx90 ");
} Else if (a> 95 ){
System. Out. println ("not bad, I also like ");
} Else if (a> 90 ){
System. Out. println (" ");
} Else {
System. Out. println ("implement the house first ");
}
Circlecontroler ();
System. Out. println ("I am back to main ...........");
}
/**
* Difference between break return and continue FS
* The Break force interrupts the cycle, and the judgment statements after the break in the loop body are not judged, directly jumping out of the loop in Vitro
* When break is used in a series of nested loops, it will only terminate the innermost loop.
*
* When the continue statement is executed, the loop will skip the next part and return directly to the starting point of the loop for judgment and operation (A <10; A ++)
*
* When the return statement is executed, all nested loops in the method are skipped and the place where the method is called is directly redirected to continue execution.
**/
Public static void circlecontroler (){
For (INT I = 0; I <2; I ++ ){
For (int A = 0; A <10; A ++ ){
System. Out. println ("starts ......" + );
If (A = 5 ){
Return;
}
}
System. Out. println ("jumping out of the for small loop .............");
}
System. Out. println ("jumping out of the for loop .............");
}
}