Question: Which one is true? If a class does not have an explicit constructor and it does not explicitly extend any other class, when you try

Which one is true?
If a class does not have an explicit constructor and it does not explicitly extend any other class, when you try to create an object from the class, the constructor of "Object" is called.
A subclass cannot add any instance variable to what it inherits from the superclass
Both of them
A subclass cannot add any instance variable to what it inherits from the superclass

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!