A)
->our own created exception is known as user defined exception.
->to create a user defined exception, the class has to inherit from java.long.Exception class or its sub class.
Ex:
class MyException extends Exception
{
//checked exception
}
class ourException extends RuntimeException
{
}//unchecked Exception
->User defined exceptions also are classified into checked and unchecked like built-in exceptions.
Comments
Post a Comment