<code>String label = (n == 1) ? "item" : "items";</code> is equivalent to
- Acheck_circle
Conditional assignment via if-else
- B
Always returns 'items'
- C
Same as switch
- D
Compile error
Explanation
Inline conditional expression.
AP Computer Science A· difficulty 4/5
<code>String label = (n == 1) ? "item" : "items";</code> is equivalent to
Conditional assignment via if-else
Always returns 'items'
Same as switch
Compile error
Explanation
Inline conditional expression.
Want 10 more like this — adaptive to your weak spots?