The Exception Handling in Java is a simple powerful trick to handle the runtime errors. Exception is an object which is thrown at runtime. It sabotages the normal flow of program. After exception handling, you can maintain normal flow of your program.

Advantage of Exception Handling

Exception sabotages the normal flow of program. That’s why we need handling. The main advantage of exception handling is to maintain the normal flow of the program.

Assume there is a program as below.

Malshi Madurangi

Undergraduate student of University of Colombo School of Computing

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store