How to use parent class constructor ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to use parent class constructor ?

Please give an example

22nd Oct 2020, 5:20 PM
Bishal Kumar Sarkar
Bishal Kumar Sarkar - avatar
2 Answers
+ 1
super() refferences to parent class contructer, with matching the arguments list...
22nd Oct 2020, 5:40 PM
Jayakrishna 🇮🇳
0
super() has to be first line in child's constructor
22nd Oct 2020, 5:57 PM
zemiak