Normal
Hallo capri,du musst aber auch aufpassen dass du hier keinen compile-Fehler erhälst.Wenn du IOException vor FileNotFoundException abfängst[code=java]catch(IOException e) {}catch(FileNotFoundException e) {}[/code]gibt es:"Unreachable catch block for FileNotFoundException. It is already handled by the catch block for IOException"Da IOException die Super-Klasse von FileNotFoundException ist, wird im ersten Catch-Blockdie FileNotFoundException bereits abgefangen.
Hallo capri,
du musst aber auch aufpassen dass du hier keinen compile-Fehler erhälst.
Wenn du IOException vor FileNotFoundException abfängst
[code=java]
catch(IOException e) {}
catch(FileNotFoundException e) {}
[/code]
gibt es:
"Unreachable catch block for FileNotFoundException. It is already handled by the catch block for IOException"
Da IOException die Super-Klasse von FileNotFoundException ist, wird im ersten Catch-Block
die FileNotFoundException bereits abgefangen.