Skip to content
Quiz · Loops · lesson 4 of 8

Quiz — i++ and ++i

Question 1 of 2

What does the program print?

JAVA
public class Main {
    public static void main(String[] args) {
        int i = 5;
        int a = i++;
        int b = ++i;
        System.out.println(a + " " + b + " " + i);
    }
}