网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

class super {   public float getNum() {return 3.0f;}   }   public class Sub extends Super {   }   Which method, placed at line 6, will cause a compiler error?()

  • A、 Public float getNum() {return 4.0f; }
  • B、 Public void getNum (){}
  • C、 Public void getNum (double d){}
  • D、 Public double getNum (float d) {retrun 4.0f; }

参考答案

更多 “ class super {   public float getNum() {return 3.0f;}   }   public class Sub extends Super {   }   Which method, placed at line 6, will cause a compiler error?()A、 Public float getNum() {return 4.0f; }B、 Public void getNum (){}C、 Public void getNum (double d){}D、 Public double getNum (float d) {retrun 4.0f; }” 相关考题
考题 有关for和while循环,以下说法错误的是() A、for循环的循环变量只能是从零开始或者从1开始的整数B、while循环是最通用的循环语句C、for循环在固定次数的循环中使用比较方便D、for循环能够完成工作,用while循环也能完成

考题 int I=1, j=0   switch(i) {   case 2:   j+=6;   case 4:   j+=1;    default:    j +=2;   case 0:   j +=4;   }   What is the value of j at line 16?()A、 0B、 1C、 2D、 4E、 6

考题 For a given ServletResponse response,which two retrieve an object for writing text data?()A、response.getWriter()B、response.getOutputStream()C、response.getOutputWriter()D、response.getWriter().getOutputStream()E、response.getWriter(Writer.OUTPUT_TEXT)

考题 Which two allow the class Thing to be instantiated using new Thing()?A、 public class Thing { }B、 public class Thing { public Thing() {} }C、 public class Thing { public Thing(void) {} }D、 public class Thing { public Thing(String s) {} }E、 public class Thing { public void Thing() {} public Thing(String s) {} }

考题 Swing界面一般都会有一个顶级Swing容器,但特殊情况下也可以没有。

考题 To take advantage of the capabilities of modern browsers that use web standards, such as XHTML andCSS, your web application is being converted from simple JSP pages to JSP Document format. However,one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in severalweb forms to create screen-specific validation functions and are included in these pages with the followingstatement: 10. 11.  14. 15. Which JSP code snippet declares that this JSP Document is a JavaScript file?()A、%@ page contentType=’application/javascript’ %B、jsp:page contentType='application/javascript' /C、jsp:document contentType='application/javascript' /D、jsp:directive.page contentType='application/javascript' /E、No declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the script tag. tag.

考题 下列有关父类属性和方法继承规则的描述错误的是哪项?()A、 父类中private修饰的属性和方法在子类中不被继承B、 父类中public修饰的属性和方法在子类中被继承且可访问C、 父类中protected修饰的属性和方法在子类中被继承且可访问D、 父类中default修饰的属性和方法在子类中被继承,若父类和子类在同一个包中,则也可访问

考题 Which statement about static inner classes is true? () A、 An anonymous class can be declared as static.B、 A static inner class cannot be a static member of the outer class.C、 A static inner class does not require an instance of the enclosing class.D、 Instance members of a static inner class can be referenced using the class name of the static inner class.

考题 ClassOne.java: 1. package com.abe.pkg1; 2. public class ClassOne { 3. private char var = ‘a’; 4. char getVar() { return var; } 5. } ClassTest.java: 1. package com.abe.pkg2; 2. import com.abc.pkg1.ClassOne; 3. public class ClassTest extends ClassOne { 4. public static void main(String[] args) { 5. char a = new ClassOne().getVar();6. char b = new ClassTest().getVar(); 7. } 8. } What is the result?()A、 Compilation fails.B、 Compilation succeeds and no exceptions are thrown.C、 An exception is thrown at line 5 in ClassTest.java.D、 An exception is thrown at line 6 in ClassTest.java.

考题 有关hashMap跟hashTable的区别,说法正确的是()。A、HashMap和Hashtable都实现了Map接口B、HashMap是非synchronized,而Hashtable是synchronizedC、HashTable使用Enumeration,HashMap使用IteratorD、Hashtable直接使用对象的hashCode,HashMap重新计算hash值,而且用与代替求模