当前位置:百科知识 > 知到药物化学答案

问题描述:

[单选] 关于以下代码的说法正确的是()class Father { public Integer getLength(){ return new Integer(4); }}class Son extends Father { public Long getLength(){ return new Long(5); }}public class Main { public static void main(String args【】) { Father f = new Father(); Son s = new Son(); System.out.println("%d,%d", f.getLength(), s.getLength()); }}
A.输出4,5 B.输出5,5 C.输出4,4 D.代码编译出错
参考答案:查看
答案解析:
☆收藏

随机题目