Which of the following members of a superclass can be extended by a subclass
C
Answer: C Class A & class B both contain display() method, class B inherits class A, when display() method is called by object of class B, display() method of class B is executed rather than that of Class A. output: Show
Creating a subclass can be as simple as including the What Member Variables Does a Subclass Inherit?
Hiding Member VariablesAs mentioned in the previous section, member variables defined in the subclass hide member variables of the same name in the superclass. |