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.
Undergraduate student of University of Colombo School of Computing