0

About hiritage in Java.

The problem was i didnt know how to extend a superclass constructor to subclasscontructor. I saw this. Public namemethod(arg,arg1){ super(scarg,scar); This.var1 = arg; This.var2 = arg1; } Thats how to make It work. subclasscontructor hace to use SUPER WORD inside method to build a complete object. Referrence: scarg means super class arg.

30th Oct 2019, 12:04 AM
Hernán Enriquez
Hernán Enriquez - avatar
3 Respuestas
+ 4
I think I understand what your asking, hopefully this helps. If I got it wrong, sorry, please clarify https://code.sololearn.com/c39ejXQWGE0Z/?ref=app
30th Oct 2019, 12:35 AM
Odyel
Odyel - avatar
+ 3
Can you re-word it? It's kinda difficult to understand what you're asking.
30th Oct 2019, 12:18 AM
Odyel
Odyel - avatar
+ 1
Sure
30th Oct 2019, 12:19 AM
Hernán Enriquez
Hernán Enriquez - avatar