Skip to content

Glossary: Java Basics

For-each loop

Also written: for-each, enhanced for

A loop written like `for (int bags : sales)` that runs once for each element of an array or collection, without needing an index.

Where the book teaches it

Related terms

LoopArrayElement