public class TestClass {
/**
*
*/
public TestClass() {
super();
}
public boolean foo() throws ArithmeticException {
try {
int Nan = 1 / 0;
} catch (ArithmeticException e) {
throw e;
} finally {
return true;
}
}
public static void main(
String[] args) {
TestClass
test = new TestClass();
boolean result = false;
try {
result = test.foo();
} catch (ArithmeticException e) {
e.printStackTrace();
}
System.out.println(result);
}
}
if we run the above program it wil give "true" as output. can anyone answer
Why?