Special Offer - Enroll Now and Get 2 Course at ₹25000/- Only Explore Now!

All Courses
While Loop Java

While Loop Java

May 2nd, 2019

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