Question: Suppose A is an abstract class, B is a concrete subclass of A , and both A and B have a no - arg constructor.

Suppose A is an abstract class, B is a concrete subclass of A, and both A and B have a no-arg constructor. Which of the following has errors (either a compile error or a runtime error)?
A[]ab= new B[10];
A[]aa=newA[10];
Bb= new B();
B[]bb= new B[10];
Aa=new A();
A a=new B();
 Suppose A is an abstract class, B is a concrete subclass

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!