Q. What is the output if a child calls super().method()?

A
Child method
B
Parent method
C
Both methods
D
Error
Solution:

super().method() calls the parent’s method, returning ‘Parent method’.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!