Solved

In Java, If You Forget to Call a Superclass Constructor

Question 48

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

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents