Computer Science, asked by Anonymous, 10 months ago

Differentiate between while and do-while Loop


Java Language

50 points (:​

Answers

Answered by omsamarth4315
6

Answer:

Here's the difference between while and do - while loop in Java :-

==> In Java While loop, the condition is tested at the beginning of the loop, and if the condition is True, then only statements in that loop will be executed. So, the While loop executes the code block only if the condition is True.

==> In Java Do While loop, the condition is tested at the end of the loop. So, the Do While executes the statements in the code block at least once even if the condition Fails.

<body bgcolor = pink><marquee><font color = white >hope it helps

Answered by Anonymous
2

Explanation:

If the condition in a while loop is false, not a single statement inside the loop is executed. In contrast, if the condition in 'do-while' loop is false, then also the body of the loop is executed at least once then the condition is tested.

Hope it helps you Mate ✌ ✌

mark as brainliest plz.

Similar questions