Choosing how to earn college credit? CLEP vs AP guide
| preferred AP College board partner for AP classes
medium Solved by 4 students

Equivalent Boolean Expressions

Mark
< Prev
Next >

Consider the following method.

public boolean isInRange(int num, int min, int max) {
    return !(num < min || num > max);
}

Which of the following can replace the return statement while maintaining the original behavior of the method?

A

return (num > min && num < max);

B

return (num >= min && num <= max);

C

return (num < min && num > max);

D

return !(num >= min && num <= max);

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1meromaroseif22 1m 07s 133
#2sinseungyun073011 - 100
#3hitrishabhatia12 - 90
#4busemagngr11 0m 27s 73
Items per page:
10
1 – 4 of 4
No comments yet. Be the first to comment!

AI Tutor

How can I help?

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