Java   View all facts   Glossary   Help
syntactic unit > statement > control flow statement > loop statement > do-while loop
Next loop statementfor loop    Uploop statement    Previous loop statementwhile loop   

do-while loop
subjectfact 
do-while loophas syntax
for (entry expression; boolean expression; continuation expression) {
//statements to keep executing while boolean expression is true
}
added by: JK, source: On To Java, 2001-10-19 11:36:38.0
has example
int c;
Reader in;
. . .
do {
c = in.read();
. . .
} while (c != -1);
added by: JK, 2001-10-19 11:36:38.0
is a subtopic of Loops and Decision Making2001-10-19 11:36:38.0
is a kind of loop statementadded by: JK, source: Sun Java Tutorial, 2001-10-19 11:36:39.0
loop statementhas purpose to execute a section of code more than once2001-10-19 11:37:19.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