All Courses
While Loop Java

While Loop Java

May 2nd, 2019 Java

While Loop Java

Syntax:

while(condition)
{
……;
}

Description :

Entry level loop, executes the statements if condition is true process continues until the condition is failed.

Example:

int i=0;
while(i<5)
{
i++;
System.out.println(“Print 5 times”);
}

Output:

Print 5 times

Print 5 times

Print 5 times

Print 5 times

Print 5 times

Social Share:

0 responses on "While Loop Java"

Leave a Message

Your email address will not be published. Required fields are marked *