1.

How Can A Subclass Call A Method Or A Constructor Defined In A Superclass?

Answer»

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.

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.



Discussion

No Comment Found