Java   View all facts   Glossary   Help
syntactic unit > statement > control flow statement > break statement > labelled break statement
Next break statementunlabelled break statement    Upbreak statement

labelled break statement comparison table
Subject have example is a kind of
break statement control flow statement
labelled break statement
//Without the label the break statement would exit the inner loop and resume execution with the outer loop
out:
for (int i = 0; i < 10; i++) {
while (x < 50) {
if (i * x++ > 400) {
break out;
}
//inner loop here
}
//outer loop here
}
break statement

Next break statementunlabelled break statement    Upbreak statement