While Loops





While loops are used to repeat a block of statements while some condition is true. There are two forms of the loop: one where the condition is checked before the statements are executed (the while loop), and one in which the condition is checked after the statements are executed (the do ... while loop).
The do ... while loop has this syntax:
do{
statements
}
while(condition);
The while loop has this syntax:
while(condition){
statements
}
continue{
statements
}
Domain Name Search
|