A-A+
6 以下程序的输出结果为 。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()
问题详情
6、以下程序的输出结果为 。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(); } }
参考答案
t x=-3; int y=-10;