Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

How can a subclass call a method or a constructor defined in a superclass?

1 Answer

Nice?Vote!
Use the following syntax: super.myMethod(); To call a constructor of the superclass, just write super(); in the first line of the subclass's constructor.
answered 1 year ago by anonymous

Related questions