Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 4: Iteration
Start Practice TestPractice Test
About Exam
easy Solved by 2 students

Integer and Floating-Point Division

Mark
< Prev
Next >

What is printed when the following code segment is executed?

int x = 15;
int y = 4;
boolean result1 = (x / y) == 3;
boolean result2 = ((double) x / y) == 3.75;
System.out.println(result1 + " " + result2);
A

true true

B

true false

C

false false

D

false true

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|