Skip to content

Commit acc63f7

Browse files
authored
Add files via upload
1 parent fbbfb31 commit acc63f7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

Diff for: Exception Handling/ControlFlow2.java

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
class ControlFlow2 {
2+
public static void main(String[] args) {
3+
int d;
4+
try {
5+
d = 0;
6+
int a = 42 / d;
7+
System.out.println("Inside Try block");
8+
} catch (ArithmeticException e) {
9+
System.out.println(e);
10+
}
11+
finally{
12+
System.out.println("After catch");
13+
}
14+
System.out.println("Outside Try-catch-finally block");
15+
}
16+
}

0 commit comments

Comments
 (0)