如下代码: class Super {undefined public Integer getLenght() { return new Integer(4); } } public class Sub extends Super {undefined public Long getLenght() { return new Long(5); } public static void main(String[] args) {undefined Super sooper = new Super(); Sub sub = new Sub(); System.out.println(sooper.getLenght().toString() + "," + sub.getLenght().toString() ); } } 输出是什么?
A. 4,4
B. 4,5
C. 5,4
D. 5,5
E. 编译失败.---------重定时不能改变返回类型
在WEB-INF目录下,必须存放的文件为:
A. class文件
B. web.xml B.jar文件 D.html文件
下列标识符(名字)命名原则中,正确的是( )
A. 类名的首字母小写
B. 变量和方法名的首写字母大写
C. 接口名的首写字母小写
D. 常量完全大写
类Test1定义如下: 1.public class Test1{ 2. public float aMethod(float a,float b){ return 0;} 3. 4.} 将以下哪种方法插入行3是不合法的。(
A. public float aMethod(float a, float
B. ,float
C. { return 0;} B、public float aMethod(float c,float
D. { return 0;} C、public int aMethod(int a, int b){ return 0;} D、private float aMethod(int a,int b,int c){ return 0;}