Computer Science, asked by kayt8451, 1 year ago

Why use reference variable of another class to create object of another class

Answers

Answered by Anonymous
0

Answer:

here's ur Answer

We can use superclass reference to hold any subclass object derived from it. Disadvantage : By using superclass reference, we will have access only to those parts(methods and variables) of the object defined by the superclass. ... This is because they are defined in subclass not in the superclass.

Similar questions