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
6 Respostas
+ 2
Noone can see your code through that link. Please write code in Code playground and share link here.
+ 2
Ahhhh. Thank you. I didnt recognize. Now it is working! 😃
+ 1
I do not have access to this code, show a copy of it.
+ 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();
}
}
0
Also share your code so we can see what you wrote
0
Beatrix Bauer
There is no dot (.) in output string.