16/06/05 19:14:01.58 /bruxSbe.net
>>824
14.16. The continue Statement
URLリンク(docs.oracle.com)
| The scope of a label of a labeled statement is the immediately contained Statement.
| The continue target must be a while, do, or for statement, or a compile-time error occurs.
ラベルのスコープはラベル直後のステートメント
continueの対象はwhile, do, forに限る
ちゅうことなんでラベルは貼れても飛ぶことができないかと
こういうのだったらできるんだけどねー
int i = 0;
Label_1: while (i < 3) {
Label_2: while (true) {
if (i % 2 == 0) {
i++;
continue Label_1;
} else {
i++;
continue Label_2;
}
}
}