Exception handling is a powerful mechanism to handle run time errors. Exception Handling allow us to control normal flow of the program by using Exception handling in program.
Advantages:-
- It throws an exception whenever a calling method encounters an error providing that the calling method takes care of that error.
- Separating error handing code from "regular" code.
- Propagating error up the call Stack.
- Grouping error types and error differentiation.
- This is done with the help of try-catch blocks.
No comments:
Post a Comment