JAVA · ОСНОВЫ · LESSON 11
As long as the condition is
while loop · about 14 minutes
Learning with progressRead the summary for free. To save the work, log in to the account.
Type the code yourself
Type an example manually. Check the signs and brackets.
public class Main {
public static void main(String[] args) {
int step = 1;
while (step <= 3) {
System.out.println(step);
step++;
}
}
}Open the editor for class workSolve it yourself
Start with int count = 1. Using while, output numbers from 1 to 4. Do not forget to change count inside the loop.
The answer is hidden. Use similar examples from the lesson notes.
Opening up your homework