1

We are able to invoke super() from subclass constructor. Since subclass IS-A superclass , and there is only 1 object created ( new Subclass()) does this imply superclass constructor exists, although it cannot be inherited, in subclass?

paidedly
  • 1,413
  • 1
  • 13
  • 22

1 Answers1

0

Constructors are not inherited. Superclass constructor 'exists' in a way that you could call it from a subclass unless it's marked as private.

And as I.K. has mentioned class could have a default constructor:

If a class contains no constructor declarations, then a default constructor with no formal parameters and no throws clause is implicitly declared.

S. Pauk
  • 5,208
  • 4
  • 31
  • 41