Computer Science, asked by dikshajadhav51, 8 months ago

write difrence between while and do while loop in java
Icse class 10th
If you give me the correct answer i will follow you and will mark you brainliest

Answers

Answered by sushilkumarpra93
1

Explanation:

A while loop is a control flow statement that allows code to be executed repeatedly based on a given Boolean condition. The while loop can be thought of as a repeating if statement.

Syntax :

while (boolean condition)

{

loop statements...

}

do while loop is similar to while loop with the only difference that it checks for the condition after executing the statements, and therefore is an example of Exit Control Loop.

Syntax:

do

{

statements..

}

while (condition);

Similar questions