Which of the following statements is true? Select the one correct answer. (a) A super() or this()

Question:

Which of the following statements is true?

Select the one correct answer.

(a) A super() or this() call must always be provided explicitly as the first statement in the body of a constructor.

(b) If both a subclass and its superclass do not have any declared constructors, the implicit default constructor of the subclass will call super() when run.

(c) If neither super() nor this() is specified as the first statement in the body of a constructor, this() will implicitly be inserted as the first statement.

(d) If super() is the first statement in the body of a constructor, this() can be declared as the second statement.

(e) Calling super() as the first statement in the body of a constructor of a subclass will always work, since all superclasses have a default constructor.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: