I would like to make a clarification with regards to multilevel inheritance in Java. Could somebody please explain each examples output (e.g. between option (i) and (iv), would the class of the object be the direct parent above, or the main parent class A)?
i) A a = new C(); a.P(); will print B.P T/F?
ii) D d = new B(); d.Q(); will cause a compilation error T/F?
iii) B b = new C(); b.M(); will cause a compilation error T/F?
iv) A a = new E(); a.P(); will print A.P T/F?