ERROR - java.lang.ArrayIndexOutOfBoundsException


java.lang.ArrayIndexOutOfBoundsException while accessing array element.


The exception occurs when program tries to access the variable out of the range of array ie when it tries to access array[0-x] or array[(length-1)+x] where x is any value > 0.


Debug and find out why program is trying to access the element out of its range and correct it.