单项选择题
阅读下面的程序,分析代码是否能够编译通过,如果能编译通过,请列出运行的结果,否则请说明编译失败的原因。 public class Demo { public static void main(String[] args) { Father f=new Son(); f.show(); } } class Father{ public void show(){ System.out.print("father show"); } } class Son extends Father{ public void show(){ super.show(); System.out.print("son show"); } }
A.show();B.out.print("father
C.show();
D.out.print("son
点击查看答案&解析
