-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathThrowCheckExceptionCompileError.java
More file actions
37 lines (27 loc) · 857 Bytes
/
ThrowCheckExceptionCompileError.java
File metadata and controls
37 lines (27 loc) · 857 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
package exhand;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
public class ThrowCheckExceptionCompileError {
public static void main(String[] args) {
ThrowCheckExceptionCompileError obj = new ThrowCheckExceptionCompileError();
try {
obj.method1();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("Write your logic here...");
}
public void method1() throws FileNotFoundException, IOException {
method2();
method3();
}
public void method2() throws IOException {
FileInputStream ios = new FileInputStream("C:\\t44mp.txt");
}
public void method3() throws FileNotFoundException {
FileInputStream ios = new FileInputStream("C:\\te243234mp.txt");
}
}