3.2 例外処理

  2.例外処理のコーディング
		  
public void MethodA( ){
try {
methodB( );
} catch(FileNotFoundException e) {
System.err.println(e.getMessage( ));
} finally {
System.out.println("MethodA finished");
}
}
public void MethodB() throws FileNotFoundException {
FileReader exFile = new FileReader("dataA.dat");
}
		  
public void MethodC(){

    try{
        MethodD();
    }catch (ExceptionA m){
        ... // 何かまずい事が起きたので反応しよう!
  }
}