When creating a custom exception, extending which class will make it a checked exception?

  • Error
  • Exception
  • RuntimeException
  • Throwable
When you extend the Exception class (or its subclasses), your custom exception becomes a checked exception in Java. Checked exceptions must be either caught or declared in the method signature where they are thrown.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *