44. Tell about exception handling method overriding?

Tell about exception handling method overriding?

Exception handling method overriding have to follow by some rules:

  1.  If the parent class method does not declare any exception, the child class override that method can’t not declared checked exception. It only can declare uncheked exception.
  2. If the parent class method declared an exception, the child class override from that can do some following action like:
    + Can declared no exception
    + Can declared same exception
    + Can declared narrower exception than parent class method

Leave a Reply

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