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

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

1. public class A {  2. void A() {  3. System.out.println(“Class A”);  4. }  5. public static void main(String[] args) {  6. new A();  7. }  8. }  What is the result?()  

  • A、 Class A
  • B、 Compilation fails.
  • C、 An exception is thrown at line 2.
  • D、 An exception is thrown at line 6.
  • E、 The code executes with no output.

参考答案

更多 “ 1. public class A {  2. void A() {  3. System.out.println(“Class A”);  4. }  5. public static void main(String[] args) {  6. new A();  7. }  8. }  What is the result?()  A、 Class AB、 Compilation fails.C、 An exception is thrown at line 2.D、 An exception is thrown at line 6.E、 The code executes with no output.” 相关考题
考题 1. class BaseClass {  2. private float x = 1.of;  3. protected float getVar() { return x; }  4. }  5. class SubClass extends BaseClass {  6. private float x = 2.Of;  7. // insert code here 8. }   Which two are valid examples of method overriding when inserted at line 7?() A、 float getVar() { return x; }B、 public float getVar() { return x; }C、 public double getVar() { return x; }D、 protected float getVar() { return x; }E、 public float getVar(float f) { return f; }

考题 现有:      - list是一个合法的集合引用      - getCollection()返回一个合法集合的引用      哪两个是合法的?()    A、 for(Object o  ;  list)B、 for(Object o  :  getCollection()C、 for(Object o  :  list.iterator()D、 for(lterator i ;  list.iterator()  ;  i.hasNext  ()  )E、 for(lterator i=list.iterator(); i.hasNext  ();  )

考题 public class Test {  public static void main(String[] args) {  String str = NULL;  System.out.println(str);  }  }   What is the result?()  A、 NULLB、 Compilation fails.C、 The code runs with no output.D、 An exception is thrown at runtime.

考题 Given an EL function foo, in namespace func, that requires a long as a parameter and returns a Map,which two are valid invocations of function foo?()A、${func(1)}B、${foo:func(4)}C、${func:foo(2)}D、${foo(5):func}E、${func:foo("easy")}F、${func:foo("3").name}

考题 集合API 中Set接口的特点是哪项?()     A、不允许重复元素,元素有顺序B、允许重复元素,元素无顺序C、允许重复元素,元素有顺序D、不允许重复元素,元素无顺序

考题 A developer is designing a web application that must support multiple interfaces,including: an XML web service for B2B HTML for web-based clients WML for wireless customers. Which designpattern provides a solution for this problem?()A、Session FacadeB、Business DelegateC、Data Access ObjectD、Model-View-ControllerE、Chain of Responsibility

考题 在Swingensp;GUI编程中, setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE) 语句的作用是()A、当执行关闭窗口操作时,不做任何操作。B、当执行关闭窗口操作时,调用WindowsListener对象并将隐藏JFrameC、当执行关闭窗口操作时,调用WindowsListener对象并隐藏和销毁JFrameD、当执行关闭窗口操作时,退出应用程序。

考题 Given that session is a valid HttpSession object:   Int max = session.getAttribute(“MyReallyLongName”);   Which is true?()  A、 The value returned needs to be cast to an int.B、 The getAttribute methos takes two arguments.C、 Primitive CANNOT be stored in the HttpSession.D、 The HttpSession attribute name must NOT exceed eight characters.