关于接口的问题求指教?
程序代码:package test;
interface ISport {
void run();
}
class Athelete implements ISport {
public void run() {
System.out.println("三级跳");
}
}
class Students implements ISport {
public void run() {
System.out.println("我随便跑跑");
}
}
class CollegeStudent extends Students {
public void study() {
System.out.println("好好学习,天天向上");
}
}
public class AnyTest {
public static void main(String[] args) {
ISport i = new Athelete();
i.run();
i = new Students();
i.run();
i = new CollegeStudent();
i.run();
i.study();// 为山么i无法引用到设个方法?i=new CollegeStudent();
CollegeStudent name = new CollegeStudent();
name.study();
}
}



