P

Priyanka Tomar • 35.28K Points
Coach

Q. 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.
  • Correct Answer - Option(B)
  • Views: 58
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics