Question: In Java, if you forget to call a superclass constructor explicitly in the constructor of a subclass, what will happen? The default constructor ( the
In Java, if you forget to call a superclass constructor explicitly in the constructor of a
subclass, what will happen?
The default constructor the one with no arguments of the superclass will be invoked automatically.
The code will not compile.
The subclass will be constructed without invoking a constructor for the superclass.
The subclass object will be given a value of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
