Answers for "What are user defined exceptions"

0

What are user defined exceptions

To create customized error messages we use userdefined exceptions. 
We can create user defined exceptions as checked or unchecked exceptions.
We can create user defined exceptions that extend Exception class or 
subclasses of checked exceptions so that userdefined exception becomes checked.
Userdefined exceptions can extend RuntimeException to create userdefined 
unchecked exceptions.

It is recommended to keep our customized exception class as unchecked,i.e 
we need to extend Runtime Exception class but not Excpetion class
Posted by: Guest on December-01-2020

Code answers related to "What are user defined exceptions"

Browse Popular Code Answers by Language