Why are constructors not inherited? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Why are constructors not inherited?

I saw this question in a challenge, and Iā€™m having trouble understanding this.

6th Aug 2019, 2:00 AM
Samuel
Samuel - avatar
1 Resposta
+ 1
Constructors are special methods, they are not inherited but can be called using the super keyword.
6th Aug 2019, 2:19 AM
Alberto Fernandez