| preferred AP College board partner for AP classes
easy Solved by 4 students
Boolean Expression and Integer Division
< Prev
Next >

Consider the following code segment:

int x = 7;
int y = 3;

if ((x < 10) && (y < 0))
  System.out.println("Value is: " + x * y);
else
  System.out.println("Value is: " + x / y);

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

A

Value is: 0

B

Value is: 2

C

Value is: 21

D

Value is: 2.3333333

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1lsj0803092211 0m 00s 100
#2hadleysmith511 0m 00s 100
#3keithy.mcbeefy11 1m 12s 28
Items per page:
10
1 – 3 of 3
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy