By implementing Actor, you promise to implement void act(List<Actor> xxx)
method, but you did not. You did implement a method void act(List<Animal> xx)
, but this is a different method (has a different signature).
Simply, you are not correctly overriding act
method:
public void act(List<Animal> newRabbits) != void act(List<Actor> newActors);
The signature must correspond. Since act
is abstract in Actor
(being an interface) you must override it in a class that implements Actor
or declare it abstract
(without being able to instantiate it.