import java.io.*;
class ExException7 {
public static void main (String[] args) {
ExException7 Ex7 = new ExException7();
Ex7.methodA();
}
void methodA(){
try {
methodB(); //(1)
} catch(FileNotFoundException e) {
System.err.println(e.getMessage()); //(3)
} finally {
System.out.println("MethodA was finished"); //(4)
}
}
void methodB() throws FileNotFoundException { //(2)
FileReader exFile = new FileReader("exFile.txt");
}
}
|