when does array index out of bound exception occu code example
Example: catch array out of bounds exception java
try {
array[index] = someValue;
}
catch(ArrayIndexOutOfBoundsException exception) {
handleTheExceptionSomehow(exception);
}
try {
array[index] = someValue;
}
catch(ArrayIndexOutOfBoundsException exception) {
handleTheExceptionSomehow(exception);
}