Here we are describing the use of using exception class in java .This tutorial describes how to handle Array list exceptions appropriately in your programs and designs. The steps involved in the program are described below:-
Output of the program
|Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
Java Result: 1
To avoid this error you have to give proper index for the List means to say starting index which is 0 for the array not 1.
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: October 23, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles