Hi
Suppose a user defined exception class, say UserExcp is created by extending the Throwable class.
What type of exception it will be checked or unchecked and why?
Printable View
Hi
Suppose a user defined exception class, say UserExcp is created by extending the Throwable class.
What type of exception it will be checked or unchecked and why?
I wouldn't consider it either, it is not an exception if it does not extend the Exception class.
However, it must be handled accordingly (i.e. surrounded with a try/catch block or use a throws declaration, same as a checked exception).