Control Statements
Loops
Repeating an operation millions of times presents no problem to a computer with an internal clock that ticks billions of times every second. Java has three constructions that allow repetition in programs:
- the while statement,
- the do-while statement, and
- the for statement