The do while loop is a variation of the while loop with the difference that the loop is executed at least once even when the condition is false.
do while
while
Syntax:
do { // code } while (condition);
Note: There is a semi-colon at the end of the loop unlike other looping constructs.
Last updated 3 years ago