Why does it always say „No Input“? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why does it always say „No Input“?

Please help me. Even though I got the right output, the program always says „No input“ and that I didn‘t pass the test. I typed the code into my computer and here it works. What is wrong with my code? https://sololearn.com/coach/810/?ref=app

26th Apr 2021, 6:40 PM
Beatrix Bauer
Beatrix Bauer - avatar
6 Answers
+ 2
Noone can see your code through that link. Please write code in Code playground and share link here.
26th Apr 2021, 6:46 PM
A͢J
A͢J - avatar
+ 2
Ahhhh. Thank you. I didnt recognize. Now it is working! 😃
26th Apr 2021, 7:01 PM
Beatrix Bauer
Beatrix Bauer - avatar
+ 1
I do not have access to this code, show a copy of it.
26th Apr 2021, 6:50 PM
Solo
Solo - avatar
+ 1
Sorry. This is my code public interface Swimmer{ void swim(); } public interface Player{ void play(); } public abstract class Animal implements Swimmer, Player{ public abstract void swim(); public abstract void play(); } public class Dog extends Animal{ public void swim(){ System.out.println("Dog is swimming."); } public void play(){ System.out.println("Dog is playing."); } } public class Cat extends Animal{ public void swim(){ System.out.println("Cat is swimming."); } public void play(){ System.out.println("Cat is playing."); } } public class Main{ public static void main(String[] args){ Animal dog = new Dog(); Animal cat = new Cat(); dog.swim(); dog.play(); cat.swim(); cat.play(); } }
26th Apr 2021, 6:52 PM
Beatrix Bauer
Beatrix Bauer - avatar
0
Also share your code so we can see what you wrote
26th Apr 2021, 6:46 PM
Jerry Hobby
Jerry Hobby - avatar
0
Beatrix Bauer There is no dot (.) in output string.
26th Apr 2021, 6:57 PM
A͢J
A͢J - avatar