SCJP程序员认证考试

单选题Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?()   class A {}   class B extends A {}   class C extends A {}   public class Q3ae4 {   public static void

题目
单选题
Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?()   class A {}   class B extends A {}   class C extends A {}   public class Q3ae4 {   public static void main(String args[]) {   A x = new A();   B y = new B();   C z = new C();   // insert statement here   }   }
A

x = y;

B

z = x;

C

y = (B) x;

D

z = (C) y;

E

y = (A) y;

如果没有搜索结果,请直接 联系老师 获取答案。
如果没有搜索结果,请直接 联系老师 获取答案。
相似问题和答案

第1题:

In HDLC Protocol, when Supervisory Frame's type code is '00'.About the following statements, which is correct.

A.Receive Ready

B.Receive not Ready

C.Reject

D.Selective Reject


正确答案:A

第2题:

Which statements can be inserted at the indicated position in the following code to make the program write 1 on the standard output when run?()  public class Q4a39 {  int a = 1;   int b = 1;   int c = 1;   class Inner {   int a = 2;  int get() {   int c = 3;   // insert statement here  return c;   }   }  Q4a39() {   Inner i = new Inner();   System.out.println(i.get());  }   public static void main(String args[]) {   new Q4a39();   }   }  

  • A、c = b;
  • B、c = this.a;
  • C、c = this.b;
  • D、c = Q4a39.this.a;
  • E、c = c;

正确答案:A,D

第3题:

Assignable cause or special variation is:

A . is indicated when a point falls outside the control limits.

B . is indicated when a point falls outside the specification limits.

C . is indicated when a run of seven or more points fall above the center line of a standard control chart.

D . is indicated when a run of seven or more points fall below the center line of a standard control chart.

E . A, C, and D.


正确答案:E

第4题:

Which statements, when inserted at the indicated position in the following code, will cause a runtime exception when attempting to run the program?()   class A {}   class B extends A {}   class C extends A {}   public class Q3ae4 {   public static void main(String args[]) {   A x = new A();   B y = new B();   C z = new C();   // insert statement here   }   } 

  • A、x = y;
  • B、z = x;
  • C、y = (B) x;
  • D、z = (C) y;
  • E、y = (A) y;

正确答案:C

第5题:

Given the following code, which method declarations, when inserted at the indicated position, will not cause the program to fail compilation?()   public class Qdd1f {   public long sum(long a, long b) {  return a + b;  }   // insert new method declaration here  }  

  • A、public int sum(int a, int b) { return a + b; }
  • B、public int sum(long a, long b) { return 0; }
  • C、abstract int sum();
  • D、private long sum(long a, long b) { return a + b; }
  • E、public long sum(long a, int b) { return a + b; }

正确答案:A,E

第6题:

______is the process by which the position of the vessel at any moment is found by applying the last well-determined position to the run that has been made since, using for this purpose the ship’s course and the distance being those indicated by log.

A.dead reckoning

B.dead weight

C.dead slow ahead

D.dead slow astern


正确答案:A
推算船位是任何时刻船位可通过前次准确的定位得到的过程,计程仪所显示的船舶航向和距离数据用于此目的。

第7题:

In which two conditions are resumable statements suspended?()

  • A、 when a user exceeds the space quota
  • B、 when a user session is terminated
  • C、 when a table that is being accessed by the current transaction is not found
  • D、 when a user manually suspends the statement
  • E、 when the maximum extents of a segment is reached

正确答案:A,E

第8题:

134 Assignable cause or special variation is:

A. is indicated when a point falls outside the control limits.

B. is indicated when a point falls outside the specification limits.

C. is indicated when a run of seven or more points fall above the center line of a standard control chart.

D. is indicated when a run of seven or more points fall below the center line of a standard control chart.

E. A, C, and D


正确答案:E

第9题:

Which layout manager is used when the frame is resized the buttons’s position in the Frame might be changed?()         

  • A、 BorderLayout
  • B、 FlowLayout
  • C、 CardLayout
  • D、 GridLayout

正确答案:B

第10题:

Which two statements are true regarding the SQL Repair Advisor?() 

  • A、 The SQL Repair Advisor can be invoked to tune the performance of the regressed SQL statements.
  • B、 The SQL Repair Advisor can be invoked even when the incident is not active for a SQL statement crash.
  • C、 The SQL Repair Advisor is invoked by the Health Monitor when it encounters the problematic SQL statement.
  • D、 The DBA can invoke the SQL Repair Advisor when he or she receives an alert generated when a SQL statement crashes and an incident is created in the ADR.

正确答案:B,D

更多相关问题