1.

If super class and subclass have same variable name, which keyword should be used to use super class?(a) super(b) this(c) upper(d) classnameThe question was asked at a job interview.This interesting question is from Inheritance in portion Inheritance of Java

Answer» CORRECT answer is (a) super

For explanation I WOULD say: Super keyword is used to access HIDDEN super class VARIABLE in subclass.


Discussion

No Comment Found

Related InterviewSolutions