Which of the following statements about no-argument constructors and inheritance are correct? (Choose two.) A. The compiler
Question:
Which of the following statements about no-argument constructors and inheritance are correct? (Choose two.)
A. The compiler cannot insert a no-argument constructor into an abstract class.
B. If a parent class does not include a no-argument constructor, a child class cannot declare one.
C. If a parent class declares constructors but each of them take at least one parameter, then a child class must declare at least one constructor.
D. The no-argument constructor is sometimes inserted by the compiler.
E. If a parent class declares a no-argument constructor, a child class must declare a noargument constructor.
F. If a parent class declares a no-argument constructor, a child class must declare at least one constructor.
Step by Step Answer:
OCP Oracle Certified Professional Java SE 11 Developer Practice Tests Exam 1Z0 819 And Upgrade Exam 1Z0 817
ISBN: 9781119696131
1st Edition
Authors: Scott Selikoff, Jeanne Boyarsky