Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit acc63f7

Browse files
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

‎Exception Handling/ControlFlow2.java

Lines changed: 16 additions & 0 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /