next up previous
Next: The while loop Up: Unit 06 Previous: Repetition of statements

Definite and indefinite loops

Conceptually, we distinguish two types of loops, which differ in the way in which the number of iterations (i.e., repetitions of the body of the loop) is determined:

In Java, like in other programming languages, both types of loop can be realized through a while statement.


next up previous
Next: The while loop Up: Unit 06 Previous: Repetition of statements