Yes. This is called rethrowing of the exception by catch block.
e.g. the catch block below catches the FileNotFound exception and rethrows it again.
e.g. the catch block below catches the FileNotFound exception and rethrows it again.
void checkEx() throws FileNotFoundException {
try{}
//code that may throw the FileNotFoundException}catch(FileNotFound eFnf){
throw FileNotFound();}
No comments:
Post a Comment