<code>int x = 5; String s = (x > 0) ? "pos" : (x < 0) ? "neg" : "zero";</code> — s is
- A
Compile error
- B
neg
- Ccheck_circle
pos
- D
zero
Explanation
First condition true → "pos".
AP Computer Science A· difficulty 4/5
<code>int x = 5; String s = (x > 0) ? "pos" : (x < 0) ? "neg" : "zero";</code> — s is
Compile error
neg
pos
zero
Explanation
First condition true → "pos".
Want 10 more like this — adaptive to your weak spots?