Question

What happens if a subclass does not explicitly call a superclass constructor?

A It results in a compilation error.
B The superclass's default (no-argument) constructor is implicitly called.
C The superclass is not initialized.
D The subclass automatically creates a default constructor for the superclass.
E The program crashes at runtime.
Practice Next

Hey! Ask a query