[quote:22mfr7ho]java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: -1[/quote:22mfr7ho]
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.
So for example:
int[] array = new int[5];
int boom = array[-1]; // Throws the exception
As for how to avoid it... um, don't do that. Be careful with your array indexes.