Which of this is correct and why?
Will we be able to use properties of b class in case of A a=new B b?
A(Parent class)—B(Sub class)
A a=new B b()
B b=new A a()
Add comment
Will we be able to use properties of b class in case of A a=new B b?
A(Parent class)—B(Sub class)
A a=new B b()
B b=new A a()