public class Test {
void method_a() {
try {
System.out.println("class Test - method_a()");
method_b();
}
catch(Exception e) {
System.out.println("method_a() exception: " + e);
}
}
void method_b() throws Exception {
try {
System.out.println("class Test - method_b()");
method_c();
}
catch(Exception e) {
throw new Exception();
}
finally {
System.out.println("finally");
}
}
void method_c() throws Exception {
throw new Exception();
}
public static void main (String args[]) {
Test t = new Test();
t.method_a();
}
}
/*
run:
class Test - method_a()
class Test - method_b()
finally
method_a() exception: java.lang.Exception
*/