ArrayIndexOutOfBoundsException in Java
The ArrayIndexOutOfBoundsException occurs whenever we are trying to access any item of an array at an index which is not present in the array. In other words, the index may be negative or exceed the size of an array.
The ArrayIndexOutOfBoundsException is a subclass of IndexOutOfBoundsException, and it implements the Serializable interface.
Example of ArrayIndexOutOfBoundsException
Constructors of ArrayIndexOutOfBoundsException
The following types of ArrayIndexOutOfBoundException constructors are -
How to avoid ArrayIndexOutOfBoundsException
Next TopicJava Tutorial
JavaTpoint offers too many high quality services. Mail us on h[email protected], to get more information about given services.
JavaTpoint offers college campus training on Core Java, Advance Java, .Net, Android, Hadoop, PHP, Web Technology and Python. Please mail your requirement at [email protected].
Duration: 1 week to 2 week