Back to Top

Sunday 15 January 2012

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

 A while statement (pre test) checks at the beginning of a loop to see whether the next loop iteration should occur. A do while statement (post test) 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 loop body at least once.

0 Responses to “ JAVA : What is the difference between a while statement and a do while statement? ”

Post a Comment

Popular Posts

Subscribe via Email
Subscribe Java Interview Questions via Email
All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar