题型:单选题 标签:代码
题目:
3. 有如下代码:
class Super
{
public Integer getLenght()
{
return new Integer(4);
}
}
public class Sub extends Super
{
public Long getLenght()
{
return new Long(5);
}
public static void main(String[]args)
{
Super super=new Super();
Sub sub=new Sub();
System.out.println(super.getLenght().toString()+","+sub.getLenght());
}
}
上述代码的输出结果是______。
A.4,5
B.4,4
C.5,4
D.编译失败