Examveda
Examveda

What happens if you try to access an array element at an index that is out of bounds in Java?

A. It returns null.

B. It throws an ArrayIndexOutOfBoundsException.

C. It returns 0.

D. It returns -1.

Answer: Option B


This Question Belongs to Java Program >> Array

Join The Discussion

Related Questions on Array