Skip to content
Quiz · Operators and expressions · lesson 2 of 8

Quiz — 7 / 2 and −7 % 3

What does the program print?

JAVA
public class Main {
    public static void main(String[] args) {
        System.out.print(7 / 2);
        System.out.print(" ");
        System.out.println(-7 % 3);
    }
}