In the case of a while statement, the condition is checked before the execution of inner statements. The execution stops if conditions turn out to be false. In the case of the do-while loop, once the set of the statement will execute then the condition in check.