A return statement inside an <code>if</code> block
- A
Has no effect
- Bcheck_circle
Returns from method, skipping rest of method
- C
Returns from the if only
- D
Throws exception
Explanation
<code>return</code> always exits the entire method.
AP Computer Science A· difficulty 3/5
A return statement inside an <code>if</code> block
Has no effect
Returns from method, skipping rest of method
Returns from the if only
Throws exception
Explanation
<code>return</code> always exits the entire method.
Want 10 more like this — adaptive to your weak spots?