Skip to main content

Unit 1 · Using Objects and Methods

Primitive Expressions

Primitive Expressions MCQ Practice

Question 1 of 15

Answered 0 of 15

Choose one answer.

What is printed by the following code segment?

public class PrimitiveExpressionsContext
{
    public static void runExample()
    {
        int total = 47;
        int box = 6;
        System.out.print(total / box + " " + total % box);
    }

    public static void main(String[] args)
    {
        runExample();
    }
}
Choose one answer.