?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Easy

Integer Arithmetic Using Division and Addition

APCSA-XPWYGN

Consider the following method:

public static void doMath()
{
    int x = 6/3;
    int y = 8/3;
    int z = x*3+y*3;
    System.out.println(z);
}

What is the output when doMath() is called?

A

11

B

12

C

13

D

14

E

15