Pegue a matriz fora dos limites Exception java

try {
    array[index] = someValue;
}
catch(ArrayIndexOutOfBoundsException exception) {
    handleTheExceptionSomehow(exception);
}
Innocent Impala