The exception handling provides the mechanism to handle the runtime errors so that normal flow of the application can be maintained.
Exception
- Dictionary Meaning:Exception is an abnormal condition.
- In java, exception is an event that disrupts the normal flow of the program. It is an object which is thrown at runtime.
Exception Handling
Exception Handling is a mechanism to handle runtime errors.Advantage of Exception Handling
The core advantage of exception handling is that normal flow of the application is maintained. Exception normally disrupts the normal flow of the application that is why we use exception handling.Five keywords used in Exception handling:
- try
- catch
- finally
- throw
- throws
- try{
- ...
- }catch(Exception_class_Name reference){}
No comments:
Post a Comment