-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThrowCase.java
More file actions
54 lines (39 loc) · 769 Bytes
/
Copy pathThrowCase.java
File metadata and controls
54 lines (39 loc) · 769 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
public class ThrowCase extends RuntimeException{
// case 1
//
// static ArithmeticException e =new ArithmeticException();
// public static void main(String[] args) {
//
// throw e;
// }
// static ArithmeticException e ;
// public static void main(String[] args) {
//
// throw e;
// }
/**
* Case 2
* */
// public static void main(String[] args) {
//
// System.out.println(10/0);
// System.out.println("hello");
//
// }
// public static void main(String[] args) {
//
// throw new ArithmeticException("/by zero");
// System.out.println("hello");
//
// }
/**
* Case 3
* */
// public static void main(String[] args) {
//
// throw new Test();
// }
public static void main(String[] args) {
throw new ThrowCase();
}
}