+ 1
I want to display firstname to parentfirst and lastname to parentsecond in my child class. I have one error.
Two parent class. https://code.sololearn.com/cgA133UZ0Nle/?ref=app
2 Antworten
+ 7
In Java, A class can extend only one class.
A work around would be to use interfaces.
On line 2 , `string` should be `String`.
+ 2
Malick Diagne Multiple Inheritance (extends more than one class) is not allow in Java so better to use interface. Btw string will be String.
You can impliment multiple interface but can't extends multiple classes.