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?
Asked
Active
Viewed 71 times
1
-
3Constructors are **never** inherited. – Mar 28 '15 at 14:11
1 Answers
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