Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Monday, December 3, 2007

java code for Nesting try/catch Statements



Nesting try/catch Statements



Nesting try/catch Statements


<%
try {
try {
int c[] = {0, 1, 2, 3};
c[4] = 4;
} catch(ArrayIndexOutOfBoundsException e) {
out.println("Array index out of bounds: " + e);
}

} catch(ArithmeticException e) {
out.println("Divide by zero: " + e);
}
%>

No comments: