Java – While Loop
While Loop: Executes as long as the condition is true.
Example:
int i = 1;
while (i <= 5) {
System.out.println(i);
i++;
}
No images available.
While Loop: Executes as long as the condition is true.
Example:
int i = 1;
while (i <= 5) {
System.out.println(i);
i++;
}
No images available.