A

Admin • 802.91K Points
Coach

Q. What exception is thrown when accessing an invalid index in an array?

  • (A) NullPointerException
  • (B) IndexException
  • (C) IllegalAccessError
  • (D) ArrayIndexOutOfBoundsException

Explanation by: Admin
Accessing an invalid index throws ArrayIndexOutOfBoundsException.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.