<code>Dog d; d.bark();</code> (without initialization) at the local-variable level
- A
Calls bark
- Bcheck_circle
Compile error (local must be initialized)
- C
Throws NPE
- D
Returns null
Explanation
Local variables must be definitely assigned before use.
AP Computer Science A· difficulty 4/5
<code>Dog d; d.bark();</code> (without initialization) at the local-variable level
Calls bark
Compile error (local must be initialized)
Throws NPE
Returns null
Explanation
Local variables must be definitely assigned before use.
Want 10 more like this — adaptive to your weak spots?