Java   View all facts   Glossary   Help
syntactic unit > statement > control flow statement > break statement > unlabelled break statement
Next break statementlabelled break statement    Upbreak statement

unlabelled break statement
subjectfact 
unlabelled break statementhas example
//Without a label the break statement exits the inner loop and resumes execution with the outer loop
for (int i = 0; i < 10; i++) {
while (x < 50) {
if (i * x++ > 400) {
break;
}
//inner loop here
}
//outer loop here
}
added by: JK, source: Teach Yourself Java 2 in 21 Days, 2001-10-19 11:38:11.0
is a subtopic of Loops and Decision Making2001-10-19 11:38:11.0
is a kind of break statementadded by: JK, source: Teach Yourself Java 2 in 21 Days, 2001-10-19 11:38:11.0
jumps outside the nearest loop to an enclosing loop or to the next statement outside the loopadded by: JK, source: Teach Yourself Java 2 in 21 Days, 2001-10-19 11:38:11.0
break statementcauses execution to immediately halt the current loop2001-10-19 11:36:12.0
has purpose to terminate a loop or switch-case statement2001-10-19 11:36:13.0
see also break2001-10-19 11:36:13.0
statementis terminated by a semicolon    2001-10-19 11:37:57.0
should be not more than one line long if possible2001-10-19 11:37:57.0
syntactic unithas syntax rule
bold = mandatory
italic = non-terminal
normal font = optional
2001-10-19 11:38:04.0