Java认证考试 题目列表
使用下列哪些关键字可以判定实参的具体类型?()     A、 asB、 isC、 instanceofD、 extends

关于object类,以下描述中正确的有()A、object类中定义了一些重要的成员函数和变量,以方便JAVA类的使用B、object类是所有其他JAVA类的直接或间接父类C、object类是一个非常特殊的“虚拟”类,也就是说,你只能丛object类中派生出其他类,但不能创建一个object类的对象。D、如果一个类已经有了父类,那么这个类同时继承了object类,也就是说,这时候这个类实际上有2个父类E、由于JAVA中的类是单继承的,因此所有的类以object类为根形成了一棵继承树

What writes the text “ ” to the end of the file “file.txt”?()A、 OutputStream out= new FileOutputStream (“file.txt”);   Out.writeBytes (“ /n”);B、 OutputStream os= new FileOutputStream (“file.txt”, true);   DataOutputStream out = new DataOutputStream(os);  out.writeBytes (“ /n”);C、 OutputStream os= new FileOutputStream (“file.txt”);   DataOutputStream out = new DataOutputStream(os);  out.writeBytes (“ /n”);D、 OutputStream os= new OutputStream (“file.txt”, true);   DataOutputStream out = new DataOutputStream(os);  out.writeBytes (“ /n”);

10. class Line {  11. public class Point { public int x,y; }  12. public Point getPoint() { return new Point(); }  13. }  14. class Triangle {  15. public Triangle() {  16. // insert code here  17. }  18. }  Which code, inserted at line 16, correctly retrieves a local instance of a Point object?() A、 Point p = Line.getPoint();B、 Line.Point p = Line.getPoint();C、 Point p = (new Line()).getPoint();D、 Line.Point p = (new Line()).getPoint();

Which HTTP method represents a request for information about the supported methods on an HTTP server?()A、 GETB、 INFOC、 HEADD、 TRACEE、 OPTIONS

What will be written to the standard output when the following program is run?()   public class Qcb90 {   int a;   int b;   public void f() {  a = 0;   b = 0;   int[] c = { 0 };   g(b, c);   System.out.println(a + " " + b + " " + c[0] + " ");   }   public void g(int b, int[] c) {   a = 1;  b = 1;  c[0] = 1;  }   public static void main(String args[]) {   Qcb90 obj = new Qcb90();   obj.f();   }   }  A、0 0 0B、0 0 1C、0 1 0D、1 0 0E、1 0 1

11. rbo = new ReallyBigObject();  12. // more code here  13. rbo = null;  14. /* insert code here */  Which statement should be placed at line 14 to suggest that the virtual machine expend effort toward recycling the memory used by the object rbo?() A、 System.gc();B、 Runtime.gc();C、 System.freeMemory();D、 Runtime.getRuntime().growHeap();E、 Runtime.getRuntime().freeMemory();

class A {  }  class Alpha {  private A myA = new A();  void dolt( A a ) {  a = null;  }  void tryIt() {  dolt( myA );  }  }  Which two statements are correct?()  A、 There are no instanced of A that will become eligible for garbage collection.B、 Explicitly setting myA to null marks that instance to be eligible for garbage collection.C、 Any call on tryIt() causes the private instance of A to be marked for garbage collection.D、 Private instances of A become eligible for garbage collection when instances of Alpha become eligible for garbage collection.

Which mechanism requires the client to provide its public key certificate?()A、HTTP Basic AuthenticationB、Form Based AuthenticationC、HTTP Digest AuthenticationD、HTTPS Client Authentication

11. String test = “Test A. Test B. Test C.”;  12. // insert code here  13. String[] result = test.split(regex);  Which regular expression inserted at line 12 will correctly split test into “Test A,” “Test B,” and “Test C”?()A、 String regex = “”;B、 String regex = “ “;C、 String regex = “.*“.D、 String regex = “//s”E、 String regex = “//.//s*”;F、 String regex = “//w[ /.] +“;

14. DateFormat df;  15. Date date = new Date();  16. //insert code here  17. String s = df.format( date);  Which two,inserted independently at line 16, allow the code to compile?()A、 df= new DateFormat();B、 df= Date.getFormatter();C、 df= date.getFormatter();D、 df= date.getDateFormatter();E、df = DateFormat.getDateInstance();F、 df= DateFormat.getInstance();

面板中可以设置的属性有()A、布局管理器B、边框C、显示的文字D、图片E、背景色

class super (   public int I = 0;   public super (string text) (   I = 1   )   )     public class sub extends super (   public sub (string text) (   i= 2   )   public static void main (straing args) (  sub sub = new sub (“Hello”);   system.out. PrintIn(sub.i);  )   )   What is the result?()A、 Compilation will fail.B、 Compilation will succeed and the program will print “0”C、 Compilation will succeed and the program will print “1”D、 Compilation will succeed and the program will print “2”

在所有的Java系统类中,Object类有什么特殊之处?它在什么情况下使用?

Use the operators "", "", which statements are true? ()   A、 0000 0100 0000 0000 0000 0000 0000 00005 gives    1000 0000 0000 0000 0000 0000 0000 0000B、 0000 0100 0000 0000 0000 0000 0000 00005 gives    1111 1100 0000 0000 0000 0000 0000 0000C、 1100 0000 0000 0000 0000 0000 0000 00005 gives    1111 1110 0000 0000 0000 0000 0000 0000D、 1100 0000 0000 0000 0000 0000 0000 00005 gives    0000 0110 0000 0000 0000 0000 0000 0000