A

Admin • 828.03K Points
Coach

Q. Suppose A is an abstract class, B is a concrete subclass of A, and both A and B have a default constructor. Which of the following is correct?
1. A a = new A();
2. A a = new B();
3. B b = new A();
4. B b = new B();

  • (A) 1 and 2
  • (B) 2 and 4
  • (C) 3 and 4
  • (D) 3 and 4 D. 1 and 3
  • Correct Answer - Option(B)
  • Views: 15
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.