Using finally statement

No comments

Java  supports  finally  statement  that  can  be  used  to  handled  an  exception   that  not  caught  any  of  the  previous  catch  statement  finally  block  can  be  used  to  handled  generated  within  a  try  block  when  a  finally  block  is  define  this  is  grunted  to  executed, regretless  of  whether  or  not  an  exception  in  through.  The  block  will  illustrate  in  bellow : --


Try
{
---------------------------------
---------------------------------
}
Try
{
----------------------------------
----------------------------------
}
Catch(Exception  e)
{
-----------------------------------
-----------------------------------
}
Catch(Exception  e1)
{
------------------------------------
------------------------------------
}
-------------------------------------
-------------------------------------
finally
{
-----------------------------------------
--------------------------------------------
}
finally
{
----------------------------------------
----------------------------------------

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀