分析下列程序:
class Super{
public int getLength() { return 4; }
}
public class ClassTest extends Super {
public int getLength() { return 5; }
public static void main(String args[]) {
Super sooper=new Super();
ClassTest t=new ClassTest();
System.out.println(sooper.getLength()+","+t.getLength());
}
}
该程序的输出结果是?
A 4,4
B 4,5
C 5,4
D 5,5
class Super{
public int getLength() { return 4; }
}
public class ClassTest extends Super {
public int getLength() { return 5; }
public static void main(String args[]) {
Super sooper=new Super();
ClassTest t=new ClassTest();
System.out.println(sooper.getLength()+","+t.getLength());
}
}
该程序的输出结果是?
A 4,4
B 4,5
C 5,4
D 5,5