标签:str main imp ring stat nts [] void public
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();
}
}
标签:str main imp ring stat nts [] void public
原文地址:http://www.cnblogs.com/Logo-TPM/p/6147798.html