0
Why does it return null
Check my code https://code.sololearn.com/c5UKWCbuI7Cj/?ref=app
2 Réponses
+ 2
That's because you're not passing in the correct arguments to your superclass when you call super(). So, change line 26 to:
super(a, b);
Also, you don't need that constructor on line 13. If you didn't have that, the way you coded it would've thrown an error instead of printing null.
+ 1
Thank you for the answer, btw constructor on line 13 is on purpose ( in another case where i want to initialize object)