Operators

Java Loops Explained: while, do-while, for, for-each

1/14

What will be the output of the program?

class Example {
    public static void main(String[] args) {
        for (int i = 0; i < 4; i += 2) {
            System.out.print(i + " ");
        }
        System.out.println(i);
    }
}
Comments