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

while loop comparison table
Subject have syntax have example have purpose is a kind of interchange with
loop statement  to execute a section of code more than oncecontrol flow statement 
while loop
while(condition)
{
// statements to keep executing while condition is true
}
//Decrement n by 1 until n is 0
while (n != 0) {
n = n - 1;
}
to repeat a computation by looping through that computation until a test has been satisfiedloop statementa for loop

Next loop statementdo-while loop    Uploop statement    Previous loop statementfor loop