do while loop

In java a do while loop is a control flow statement that allows a certain code to be executed repeatedly based on a given condition.

Ads

do while loop

     

In java a do while loop is a control flow statement that allows a certain code to be executed repeatedly based on a given condition. This loop is used in java in those conditions when some statements and processes should execute at least once.
   
The do construct includes of a block of code along with a condition associated with the while keyword. The code inside the do construct is evaluated and then checks the condition associated with the while, the code inside the do construct is executed until the condition associated with the while becomes false. Here is the syntax for the do while loop.

The Syntax for the do-while loop: 

   do
  {
  statements;
  }
  while(condition);

  
To know more about the do-while loop along with the example click on the link given below:

http:/www.roseindia.net/java/beginners/DoWhile.shtml

Advertisements

Ads
Share on Google+Share on Google+

do while loop

Posted on: October 7, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: do while loop  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads