I already passed this, so the code below is not valid.
Question: Why does it complain that the method's that I override, needs to be "public" ? If I don't specific an access modifier in front, is it not automatically "public" ?
thanks for the tips
package com.codegym.task.task13.task1315;
/*
Tom, Jerry and Spike
*/
public class Solution {
public static void main(String[] args) {
}
public class Dog implements CanMove,CanEat{
}
public class Cat implements CanMove,CanEat,Edible{
}
public class Mouse implements CanMove,Edible{
}
// Can move
public interface CanMove {
void move();
}
// Can be eaten
public interface Edible {
void beEaten();
}
// Can eat
public interface CanEat {
void eat();
}
}