Answer:
The set is a object of the class 'H' and the setY method is a member of G class which is not called by the object of H class.
Step-by-step explanation:
- If a user calls the G function which is not a private by the help of H class objects then it can be called. It is because all the public and protected methods of A class can be accessed by the B class if B extends the A-class.
- If any class is extended by the other class then the derived class holds the property of the base class and the public and protected method can be accessed by the help of a derived class object.
- The derived class object can be created by the help of base class like written in the "line 1".
- But the base class can not call the member of the derived class.