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 fbbfb31

Browse files
Add files via upload
1 parent ab2fdce commit fbbfb31

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

‎Exception Handling/ControlFlow1.java

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

0 commit comments

Comments
(0)

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