Answers

Question and Answer:

  Home  Sr.Java Web Developer

⟩ Do you know how to create a custom Exception?

To create you own exception extend the Exception class or any of its subclasses.

☛ class New1Exception extends Exception { } // this will create Checked Exception

☛ class NewException extends IOException { } // this will create Checked exception

☛ class NewException extends NullPonterExcpetion { } // this will create UnChecked exception

 165 views

More Questions for you: