Skip to content

Commit 800e772

Browse files
committed
Interrupted Exception Handling
1 parent 4538a0b commit 800e772

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
class ExceptionHandling {
2+
3+
public static void main(String[] args) {
4+
5+
for(int i = 0; i < 10; i++) {
6+
7+
System.out.println(i);
8+
9+
try {
10+
11+
Thread.sleep(1000);
12+
} catch(InterruptedException obj) {
13+
14+
System.out.println("Exception Handled");
15+
}
16+
}
17+
}
18+
}

0 commit comments

Comments
 (0)