Java supports 'for', 'while', and 'do-while' loops. The enhanced for-loop (for-each) is used for arrays and collections.
← Core Java theorytheory 0/50 · 0%
Fundamentals · easy
5. Loops: For and While
Iterating through blocks of code.
Check your understanding
1. Which loop always executes at least once?
2. How to exit a loop early?