Given code:public abstract class A{ }public class B extends A{}The following code sequence would correctly create an object reference of class A holding an object reference for an object of class B:A c;c = new B();TrueFalse

Respuesta :

Answer:

True.

Explanation:

In the code given in the question we have an abstract class A.Then we have a class B which inherits the class A it is also an example of single inheritance.

Line A c; creates a reference of A type.

Line c=new B(); states that the reference of A type will refer to an object of class B.

Hence we conclude that the answer is True.