Handling Exception through try, catch, finally.

Posted by manasvisawant45 on September 17, 2020 10:45 pm

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.


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