Skip to content

Glossary: Java Basics

Loop

Also written: loops, iteration

Code that repeats: a `while` loop repeats while its condition is true, a `for` loop counts, and each pass is an iteration. If the condition never becomes false the loop is infinite; stop it with Ctrl+C.

Where the book teaches it

Related terms

while loopfor loopFor-each loopbreakcontinue