Accessing <code>a[5]</code> on a length-3 array
- A
Returns null
- Bcheck_circle
Throws ArrayIndexOutOfBoundsException at runtime
- C
Returns 0
- D
Compile error
Explanation
Bounds checked at runtime; throws AIOOBE.
AP Computer Science A· difficulty 3/5
Accessing <code>a[5]</code> on a length-3 array
Returns null
Throws ArrayIndexOutOfBoundsException at runtime
Returns 0
Compile error
Explanation
Bounds checked at runtime; throws AIOOBE.
Want 10 more like this — adaptive to your weak spots?