Demo of ArrayIndexOutOfBoundsException | java.lang package
Figure1 |
Class Hierarchy:
ArrayIndexOutOfBoundsException is a class present in java.lang.* package and has following class hierarchy.
Description:
Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.
JDK1.0
Figure2 |
Description:
Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.
Since:
JDK1.0
Example:
Output:
Figure3 |
References:
https://docs.oracle.com/javase/8/docs/api/java/lang/ArrayIndexOutOfBoundsException.html
Thank you friends, I hope you have clearly understood the solution of this problem. If you have any doubt, suggestion or query please feel free to comment below. You can also discuss this solution in our forum.
Thank you friends, I hope you have clearly understood the solution of this problem. If you have any doubt, suggestion or query please feel free to comment below. You can also discuss this solution in our forum.
Demo of ArrayIndexOutOfBoundsException | java.lang package
Reviewed by Rohit Agarwal
on
10/18/2017
Rating:
Wow! I couldn't even imagine, that it is possible to build so many programs on Java. Your posts will definitely be useful for programmers.
ReplyDelete