package polymophism;
public interface Action {
public void eat();
}
public class Tester {
public static void main(String[] args) {
Action m = new Man();
Human hm = new Man();
Tester tester = new Tester();
tester.eat(m);
tester.eat(hm);
}
private void eat(Action m) {
m.eat();
}
private void eat(Human m) {
m.eat();
}
}