T E C h O C E A N H U B

Handling Exception through try, catch, finally.

In the previous post we learned that how exceptions are created and here we are going to see what keywords are used to handle exception, and they are try, catch and finally. Below there is a structure explaining the  methodology representing handling of exceptions. 

You must be amazed to know that besides catch and finally are optional, only try block is important. There can be more than one catch block associated with one try block. However, there are many versions of these keywords(try, catch, finally).

Now, let’s see simple program explaining how exceptions are handled with the help of these keywords.

https://www.youtube.com/watch?v=aM6gaAtrWQ0

Try above example and feel free to comment and subscribe my channel.

Copyright ©TechOceanhub All Rights Reserved.