Back
What is the difference between the do and do-while loop in Java?
The while loop executes only after checking the condition. Whereas, a do-while loop executes the loop before checking the condition. A do-while guarantees execution of statement at least once.
Want to learn Java? Check out the Java certification from Intellipaat.
31k questions
32.8k answers
501 comments
693 users