?

AP® Computer Science A

Free Version

Upgrade subject to access all content

Moderate

Integer Math with Variables

APCSA-AFEMXF

Consider the following code segment.

int num1=3, num2=5, num3=4;
System.out.println( num1/num3-num2*num1/(num3+1)+10/4*2);

What is printed to the console as a result of executing the code segment?

A

1.75

B

4

C

1

D

2.75

E

7