
reference.language.do-while.html Maven / Gradle / Ivy
While
Do while statement
A do while statement is a way to execute a set of statements until a condition stops being met.
A do while statement has the form do
followed by a list of statements which will be executed repeatedly,
followed by while condition
where condition
is a boolean expression.
Breaking the iteration
It is sometimes useful to break the iteration before testing the condition again. This is achieved using the break
statement.
The difference between a while and a do while statements is that the embedded statements in a while statement may never get executed,
when they are always executed at least once with a do while statement
© 2015 - 2025 Weber Informatics LLC | Privacy Policy