add advantage of exception handling to the article (#23434)
* add advantage of exception handling to the article * Fixed formattingpull/21172/head^2
parent
78757fab28
commit
5ff05b9832
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue