Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

If a method throws NullPointerException in the superclass, can we override it with a method that throws RuntimeException?

Deepika Sahu answered on December 24, 2022 Popularity 2/10 Helpfulness 1/10

Contents


More Related Answers

  • what is the superclass in exceptions
  • can subclass method infere exceptions of its superclass method
  • Java Program to Illustrate Exception Handling // with Method Overriding // Where SuperClass does not declare any exception and // subclass declare checked exception
  • Java Program to Illustrate Exception Handling // with Method Overriding // Where SuperClass declares an exception and // SubClass declares a child exception // of the SuperClass declared Exception
  • Java Program to Illustrate Exception Handling // with Method Overriding // Where SuperClass declares an exception and // SubClass declares without exception

  • If a method throws NullPointerException in the superclass, can we override it with a method that throws RuntimeException?

    0
    Popularity 2/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: java throws
    Link to this answer
    Share Copy Link
    Contributed on Dec 24 2022
    Deepika Sahu
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.