前提条件
public interface Animal {
void say();
void run(String addr);
}
public class Dog implements Animal {
@Override
public void say() {
System.out.println("汪汪汪");
}
@Override
public void run(String addr) {
say();
System.out.println("狗在" + addr + "跑");
}
}