implements使用
interface Sport {
void run();
void jump();
}
class Athlete implements Sport {
public void run() {
System.out.println("短跑");
}
public void jump() {
System.out.println("跳高");
}
public static void main(String[] args) {
Ahtlete al=new Ahtlete();
al.run();
al.jump();
}
}