add advantage of exception handling to the article (#23434)

* add advantage of exception handling to the article

* Fixed formatting
This commit is contained in:
Shubhanshu Pratap Singh
2018-11-26 09:48:12 +05:30
committed by Manish Giri
parent 78757fab28
commit 5ff05b9832

View File

@ -16,7 +16,7 @@ All exception and errors types are sub classes of class Throwable, which is base
## How to use try-catch clause
```
```java
try {
// block of code to monitor for errors
// the code you think can raise an exception
@ -32,3 +32,5 @@ finally {
// block of code to be executed after try block ends
}
```
## Advantage of Exception Handling
The core advantage of exception handling is to maintain the normal flow of the application. An exception normally disrupts the normal flow of the application which is why we use exception handling.