Java认证考试 题目列表
Which statements concerning the event model of the AWT are true?()  A、At most one listener of each type can be registered with a component.B、Mouse motion listeners can be registered on a List instance.C、There exists a class named ContainerEvent in package java.awt.event.D、There exists a class named MouseMotionEvent in package java.awt.event.E、There exists a class named ActionAdapter in package java.awt.event.

现有:  public class Tester {  public static void main (String[] args)  {      intx-5;  Integer xl=x;  Integer x2=x;     int x3=new Integer(5);  system..ut.print(x1.equals(x));      system..ut.print(xl==x);  system..ut.print(x2.equals(xl));      system..ut.print(x2==xl);      system..ut.print(x2==x3);  system..ut.print(x2.equals(x3));         }      }      结果为:()     A、编译失败B、falsefalsetruetruetruetrueC、truetruetruetruetruetrueD、falsefalsetruetruetruefalseE、truefalsetruefalsefalsetrueF、运行时异常被抛出

能够遍历泛型List〈Integer〉 al中的所有元素的语句是哪项?()  A、for(Integer i : al)B、for(i : al)C、for(al)D、forEach(Integer i : al)

现有:   1. class Book {    2.   private final void read() { System.out.print("book "); }    3. }   4. class Page extends Book {    5.   public static void main(String [] args) {    6.     // insert code here   7.   }    8.   private final void read() { System.out.print("page "); }    9. }    和如下三个代码片段 ( x, y, z ):   x. // just a comment    y. new Page().read();   z. new Book().read();    分别插入到第6行,有几个允许代码通过编译并可以运行且无异常?()  A、 0B、 1C、 2D、 3


下列哪项是String的字面量?() A、“Hello”B、‘world’C、/u2345D、new String(“good”)

Which of the following statements about variables and their scopes are true? ()   A、 Instance variables are member variables of a class.B、 Instance variables are declared with the static keyword.C、 Local variables defined inside a method are created when the method is executed.D、 Local variables must be initialized before they are used.

A developer is designing a multi-tier web application and discovers a need to hide the details of establishingand maintaining remote communications from the client. In addition, the application needs to find,in a transparent manner,the heterogeneous business components used to service the client’s requests. Which design patterns, working together, address these issues?()A、Business Delegate and Transfer ObjectB、Business Delegate and Service LocatorC、Front Controller and Business DelegateD、Intercepting Filter and Transfer Object

以下有关接口的叙述错误的是哪项?() A、 一个类可以实现多个接口B、 接口不能被继承C、 类实现接口时必须实现其中的方法D、 接口中只能包含抽象方法和常量


Which two can be used to create a new Thread? ()A、 Extend java.lang.Thread and override the run method.B、 Extend java.lang.Runnable and override the start method.C、 Implement java.lang.thread and implement the run method.D、 Implement java.lang.Runnable and implement the run method.E、 Implement java.lang.Thread and implement the start method.

现有:   1. interface Altitude {   2.   //insert code here  3. }    和4个声明:  int HIGH = 7;   public int HIGH = 7;   abstract int HIGH = 7;   interface int HIGH = 7;    分别插入到第2行,有多少行可以编译?()  A、 0B、 1C、 2D、 3E、 4

现有:  class Banana2  f      static int X=2;  public static void main (String  []  args)  {     int X=2;   Banana2 b=new Banana2();     b.go(x);     }  static  {x+=x; }   void go (int x)  {    ++x;  System. out.println (x);    }         结果为:()    A、7B、5C、3D、2

Java语言中表达式“11”+22的结果是哪项?()  A、33B、1122C、22D、表达式错误