You now know how to make Java repeat code with loops. while checks a condition first, for packages initialization, condition, and update into one line, and do-while guarantees at least one execution.
You can exit a loop early with break and skip an iteration with continue. For nested loops, labeled versions of both let you target a specific loop. Keep off-by-one errors in check by testing your boundaries with the first and last values.