if (!(x < 5)) {
return true;
}
return false;Which expression is equivalent to !(x < 5)?
- A
x != 5
- B
x <= 5
- C
x > 5
- Dcheck_circle
x >= 5
Explanation
The negation of x < 5 is x >= 5 (x is at least 5).
AP Computer Science A· difficulty 2/5
if (!(x < 5)) {
return true;
}
return false;Which expression is equivalent to !(x < 5)?
x != 5
x <= 5
x > 5
x >= 5
Explanation
The negation of x < 5 is x >= 5 (x is at least 5).
Want 10 more like this — adaptive to your weak spots?