while Loop
A loop that repeats while its condition remains true.
What is while Loop in Java?
while Loop — A loop that repeats while its condition remains true.
class Counter {
int countToThree() {
int number = 0;
while (number < 3) {
number++;
}
return number;
}
}
Level: Apprentice · More Java terms at this level
Updated