In the while the boolean expression is evaluated and if the result is true the following block is executed until the condition becomes false . Note that if the condition is false on the first place, the block is never executed. Then if the result turn to be true the block is executed until the condition evaluation is false . Typically, the loop is used to iterate a variable over a range of values until some logical end to that range is reached. Labels are typically used on blocks and loops.
Labeled blocks are useful with break and continue .
A break statement can be used to exit any block . A break is most often used to break out of a loop, but can be used to immediately exit any block . A continue is often used to skip over an element of a loop range that can be ignored. A continue statement can specify a label of an enclosing loop, which applies the continue to the named loop instead of the innermost loop. A labeled continue will break out of any inner loops on its way to the next iteration of the named loop.