flag1がtrueなので、whileループが開始されます。 最初にflag1 = falseとなり、if条件に入りますが、flag1 == flag2がfalseなので、continueが実行されません。 その結果、System.out.print("B")が出力されます。 その後、break文が実行されてループが終了します。
In Java, a switch statement is used to execute different blocks of code depending on the value of a single variable or expression. It is a convenient way to avoid ...
Java Continue Statement The continue statement is used in loop control structure when you need to jump to the next iteration of the loop immediately. It can be used with for loop or while loop. The ...