File size: 463 Bytes
c574d3a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
public class ExceptionPropagation {
void m() {
int data = 50 / 0;
}
void n() {
m();
}
void p() {
try {
n();
} catch (Exception e) {
System.out.println("exception handled");
}
// n();
}
public static void main(String[] args) {
ExceptionPropagation obj = new ExceptionPropagation();
obj.p();
System.out.println("normal flow...");
}
}
|