Skip to content
Quiz · Loops · lesson 2 of 8

Quiz — do-while with a false condition

What does the program print?

JAVA
public class Main {
    public static void main(String[] args) {
        int i = 10;
        do {
            System.out.print(i + " ");
            i++;
        } while (i < 5);
        System.out.println(i);
    }
}