About Java there are no errors or outputs.why? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

About Java there are no errors or outputs.why?

https://code.sololearn.com/cC0R2gvCcerC/?ref=app

20th Apr 2023, 3:05 PM
W X
W X - avatar
5 Answers
+ 7
Additionally: The swim() and play() methods shouldn't have any parameters or return values. The implementation of the methods should just print the line to the console.
20th Apr 2023, 3:20 PM
Lisa
Lisa - avatar
+ 7
https://www.sololearn.com/Discuss/3207862/?ref=app Don't repeat the related same question and please learn Java carefully from sololearn otherwise you wastage of your time.
20th Apr 2023, 4:18 PM
Sakshi
Sakshi - avatar
+ 6
You have an extra close brace } after last 2 classes.. . Is these your own implementations? You are not using Child class methods. Calling only Parent class play(), swim() methods. Then there, play(String a), swim( String b) methods are no use..!
20th Apr 2023, 3:17 PM
Jayakrishna 🇮🇳
+ 6
Tapabrata Banerjee please don't provide readymade program because he will not learn from mistakes you can give the hint like Lisa mam and Jayakrishna sir said that.
20th Apr 2023, 4:26 PM
Sakshi
Sakshi - avatar
0
well, l just copied the problem from the Java practice, not the solution. and the return name is a non-reference variable that is not initialized. from the contents of the code, there is no relation with the name. Suddenly return name. the compiler will think what is the name
22nd Apr 2023, 10:25 AM
W X
W X - avatar