What exception is thrown if an invalid index is accessed in an array?

Last Updated :
Discuss
Comments

What exception is thrown if an invalid index is accessed in an array?

NullPointerException

IndexOutOfBoundsException

ArrayIndexOutOfBoundsException

IllegalArgumentException

Share your thoughts in the comments