Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

difference between a while statement and a do statement

Fri Nov 07, 2008 12:30 am

What is the difference between a while statement and a do statement?



Re: difference between a while statement and a do statement

Fri Nov 07, 2008 12:32 am

A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the body of a loop at least once.

Post a reply
  Related Posts  to : difference between a while statement and a do statement
 difference between break statement and a continue statement     -  
 while Statement in php     -  
 The do...while Statement     -  
 Need help with if statement     -  
 Using the for Statement     -  
 PHP if statement and else if     -  
 For statement without all three statements     -  
 global statement in php     -  
 Using the continue Statement     -  
 Define statement     -