登录  注册

首页->java基础知识

下述代码的执行结果是class Super { public int getLength() { return 4; }}public class Sub extends Super { public long getLength() { return 5; } public static void main (String[]args) { Super sooper = new Super (); Super sub = new Sub(); System.out.printIn(sooper.getLength()+ “,” + sub.getLength() ); }}

(A)4, 4

(B)4, 5

(C)5, 4

(D)代码不能被编译

参考答案
继续答题:下一题
微考学堂微考学社

更多java基础知识试题

考试