单项选择题
以下程序的输出结果为 。class Father { void sport() { System.out.print("打篮球!"); } } class Son extends Father { void sport() { System.out.print("踢足球!"); } } public class Test { public static void main(String[] args) { Father father = new Father(); Son son = new Son(); father.sport(); son.sport(); } }
A.out.print("打篮球!");B.out.print("踢足球!");
C.sport();
D.sport();
点击查看答案&解析
