Both types of loops repeat a block of statements until some condition becomes false.
The MAINDIFFERENCE is that in a while loop, the test-condition is tested at the beginning of the loop, and inado-whileloop, thetest-condition is tested at the end of the loop.
It is possible that the body of a while loop MIGHT not beexecutedatall.
However,The body of a do-while loop is executed at least once sincethe test-condition for ending the loop is not tested until the body of the loop as been executed.