All Downloads are FREE. Search and download functionalities are using the official Maven repository.

reference.language.while.html Maven / Gradle / Ivy




    
    Do while
    
    

    
    

    
    

    
    
    
    

    


While statement

A while statement is a way to execute a set of statements while a condition is met.
A while statement has the form while condition followed by a list of statements which will be executed repeatedly, 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