Java Lesson 6 – Loops (cont’d)
The next loop I want to talk about is the do-while loop. This kind of loop is different from a for loop in that it will loop indefinitely until a condition no longer applies. Think of it as an ‘if’ statement that repeats.
do
{
// code to repeat
} while(condition)