Can the super keyword be used in a class that does not extend another class?

  • Yes
  • No
  • Only in static methods
  • Only in arrow functions
No, the super keyword is used to call corresponding methods of the superclass in a subclass. If a class doesn't extend another class, there is no superclass, and using super is not valid.
Add your answer
Loading...

Leave a comment

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