Inheritance | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Inheritance

Can someone please explain for me inheritance. I find it really easy to understand but hard to code it😔. https://code.sololearn.com/cYEqzERPbe2e/?ref=app https://code.sololearn.com/cYEqzERPbe2e/?ref=app

21st Nov 2018, 4:23 AM
Romo
Romo - avatar
5 Answers
+ 2
There are two serious problem.in code: - A java file have would have one public class (equals to filename) but you have declared either class like public... Remove "public" from Vehicle - You defined a method which get string param, but you call without param (driver)
21st Nov 2018, 6:28 AM
KrOW
KrOW - avatar
+ 2
👍👍👍
21st Nov 2018, 1:18 PM
KrOW
KrOW - avatar
+ 1
KrOW thanks man
21st Nov 2018, 10:02 AM
Romo
Romo - avatar
0
i have tried to code it up there 👆🏽 but its hard for me. Someone correct me. Using comments if necessary
21st Nov 2018, 4:23 AM
Romo
Romo - avatar