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 ...
📝 Important Notes – break & continue (Java) 🔹 break • Immediately terminates the loop • Control moves to the statement after the loop • Can be used in for, while, do-while, and switch • Also ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する