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();
bd 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.
Computer Science & Information Technology
You might also like to view...
To avoid a cluttered desktop, you can create a ________ to store related files
Fill in the blank(s) with correct word
Computer Science & Information Technology
Which of the following protocols should a technician consider troubleshooting if a user is not receiving incoming emails on their desktop?
A. SMTP B. POP3 C. FTP D. SIP
Computer Science & Information Technology