Custom Exception
- 31st Jul 2018
- 0
- 9349
- Custom exception in java with an example how to create our own custom exception when should we go for custom exception When to use custom exception in java ?
Custom exceptions are also called as user defined exceptions We know that, Java has already provided bunch of exceptions to handle various scenarios like ArithmeticException,NullPointerException,ArrayIndexOutOfBoundException etc. These exceptions will be thrown by java based on pre-defined conditions ArithmeticException will be thrown whenever we divide number by zero NullPointerException will be thrown whenever we access method […]