Which statement about a no-argument constructor is true? A. The Java compiler will always insert a default
Question:
Which statement about a no-argument constructor is true?
A. The Java compiler will always insert a default no-argument constructor if you do not define a no-argument constructor in your class.
B. For a class to call super() in one of its constructors, its parent class must explicitly implement a no-argument constructor.
C. If a class extends another class that has only one constructor that takes a value, then the child class must explicitly declare at least one constructor.
D. A class may contain more than one no-argument constructor.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
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
Question Posted: