adplus-dvertising
frame-decoration

Question

What is the main difference between a WHILE and a DO-WHILE loop in Java?

a.

WHILE loop executes the statements inside of it at least once even if the condition is false.

b.

DO-WHILE loop executes the statements inside of it at least once even if the condition is false.

c.

WHILE loop is fast.

d.

DO-WHILE loop is fast.

Posted under Java Programming

Answer: (b).DO-WHILE loop executes the statements inside of it at least once even if the condition is false.

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the main difference between a WHILE and a DO-WHILE loop in Java?