When should we create our own custom exception classes? The term exception lets the programmer to know that there is something exceptional has occurred in the program. Apart from Java exception class library, a custom exception can be created by the developer. This customization gives the power to deal with application centric exceptions. For instance, in a banking application a customer tries to withdraw amount which results in below the minimum balance. In this scenario, the developer needs to implement a customized exception.
|