+ 2
In Java a reference variable of superclass is assigned to sub class . ls superclass knows the variables and methods of subclass
Java
2 odpowiedzi
+ 1
It depends on type of object not the type of reference
0
I think inheritance works only downstream. Anyway the child class methods and variables will be visible for the parent class if they are public.