1.

What should be used to call the base class method from the derived class if function overriding is used in Java?(a) Keyword super(b) Scope resolution(c) Dot operator(d) Function name in parenthesisI have been asked this question during an interview for a job.My question is based upon Overriding Member Functions in section Member Functions & its Types of Object Oriented Programming

Answer»

Correct CHOICE is (a) KEYWORD super

The best I can explain: The keyword super must be used to ACCESS base CLASS members. Even when overriding is used, super must be used with the dot operator. The overriding is possible.



Discussion

No Comment Found

Related InterviewSolutions