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 is correct?
a. A a = new A();
b. A a = new B();
c. B b = new A();
d. B b = new B();
b. A a = new B();
d. B b = new B();
Since B is a concrete class with a no-arg constructor, d is correct. Since an instance of B is also an instance of A, b is also correct.
You might also like to view...
Which team is responsible for conducting the BIA?
A. CP Management Team (CPMT) B. Business continuity (BC) team C. Incident response (IR) team D. Disaster recovery (DR) team
Cascading Style Sheets are used to ____.
A. create the structure of the Web page B. format Web pages C. control elements of Web page content D. all of the above
The Fibonacci sequence was mentioned in the 2006 movie The DaVinci Code.
Answer the following statement true (T) or false (F)
The ________ function should be used to calculate the interest paid on the first payment of a mortgage
Fill in the blank(s) with correct word