next up previous
Next: Definite and indefinite loops Up: Unit 06 Previous: Statements in Java

Repetition of statements

Often, to solve a problem, it is necessary to repeat several times certain statement, possibly changing the value of some variable at each repetition.

Programming languages provide two ways to obtain the repetition of statements:

We will see now the use of loops, and we will see later the use of recursion.


next up previous
Next: Definite and indefinite loops Up: Unit 06 Previous: Statements in Java