移动端

  • 题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

计算机考试 | Oracle认证考试

模式切换

0 0 0
我的错题 我的收藏 学习笔记

章节目录

单选题 Click the Exhibit button.   Given: ClassA a = new ClassA();   a.methodA();   What is the result?()

A

 The code runs with no output.

B

 Compilation fails.

C

 An exception is thrown at runtime.

D

 ClassC is displayed.

多选题 Given:   10. class One {   11. void foo() { }   12. }   13. class Two extends One {   14. //insert method here   15. }   Which three methods, inserted individually at line 14, will correctly complete class Two?()

A

 public void foo() { /* more code here */ }

B

 private void foo() { /* more code here */ }

C

 protected void foo() { /* more code here */ }

D

 int foo() { /* more code here */ }  

E

 void foo() { /* more code here */ }

单选题 Given: Which statement is true?()

A

 The cardID and limit variables break polymorphism.

B

 The code demonstrates polymorphism.

C

 The ownerName variable breaks encapsulation.

D

 The setCardInformation method breaks encapsulation.

E

 The class is fully encapsulated.

单选题 Click the Exhibit button.   Given this code from Class B:   25. A a1 = new A();   26. A a2 = new A();   27. A a3 = new A();   28. System.out.println(A.getInstanceCount());   What is the result?()

A

 Compilation of class A fails.

B

 Line 28 prints the value 3 to System.out.

C

 Line 28 prints the value 1 to System.out.

D

 Compilation fails because of an error on line 28.

E

 A runtime error occurs when line 25 executes.

单选题 Given:   What is the result?()

A

 If you define D e = new E(), then e.bMethod() invokes the version of bMethod() defined in Line 5.

B

 If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 5.

C

 Compilation fails because of an error in line 9.

D

 If you define D e = (D)(new E()), then e.bMethod() invokes the version of bMethod() defined in Line 9.

E

 Compilation fails because of an error in line 3.

F

 Compilation fails because of an error in line 7.

单选题 Given: What is the result?()

A

 An exception is thrown at runtime.

B

 r, e, o,

C

 Compilation fails.

D

 r, t, t,

最新资讯

1 2 3 下一页 尾页 /

到第