advantages of Exception handling in javaBenefits of Java Exception Handling
- Separating Error-Handling code from regular business logic code
- Propagating errors up the call stack
- Grouping and differentiating error types
- Call stack mechanism : If a method throws an exception and it is not handled immediately, then that exception is propagated or thrown to the caller of that method. This propogation continues till it finds an appropriate exception handler,if it finds handler it would be handled otherwise program terminates abruptly.