To create a user-defined exception, one must usually extend the ________ class.

  • BaseException
  • CustomException
  • Error
  • Exception
To create a user-defined exception, one must usually extend the Exception class. By extending this base class, developers can define their own custom exceptions with specific behaviors, making the code more modular and maintainable.
Add your answer
Loading...

Leave a comment

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