When does the ArrayIndexOutOfBoundsException occur?
Answer: B
ArrayIndexOutOfBoundsException is a run-time exception and the compilation is error-free.