Solved

In Java, If You Forget to Call a Superclass Constructor

Question 96

Multiple Choice

In Java, if you forget to call a superclass constructor explicitly in the constructor of a subclass, what will happen?


A) The code will not compile.
B) The default constructor (the one with no arguments) of the superclass will be invoked automatically.
C) The subclass will be constructed without invoking a constructor for the superclass.
D) The subclass object will be given a value of null.

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions