what is the difference between a while statement


What is the difference between a while statement and a do while statement?

A while statement checks at the starting of a loop to see whether the next loop iteration should occur.

A do while statement checks at the end of a loop to see whether the next iteration of a loop should occur.

The do while statement will always implement the body of a loop at least once.

 

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: what is the difference between a while statement
Reference No:- TGS0310934

Expected delivery within 24 Hours