< HTML>
Throwing Exceptions From Methods
Throwing Exceptions From Methods
<%!
void doWork() throws ArrayIndexOutOfBoundsException
{
int array[] = new int[100];
array[100] = 100;
}
%>
<%
try {
doWork();
} catch (ArrayIndexOutOfBoundsException e) {
out.println("Array out of bounds exception");
}
%>