移动端

  • 题王微信公众号

    题王微信公众号

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

计算机考试 | Oracle认证考试

模式切换

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

章节目录

单选题 Given:   11. public static void main(String[] args) {   12. Object obj = new int[] { 1, 2, 3 };   13. int[] someArray = (int[])obj;   14. for (int i : someArray) System.out.print(i + " ");   15. }   What is the result? ()

A

 Compilation fails because of an error in line 13.

B

 A ClassCastException is thrown at runtime.

C

 1 2 3

D

 Compilation fails because of an error in line 14.

E

 Compilation fails because of an error in line 12.

多选题 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: What is the result?()

A

 An exception is thrown at runtime.

B

 r, e, o,

C

 Compilation fails.

D

 r, t, t,

多选题 Given:   12. NumberFormat nf = NumberFormat.getInstance();   13. nf.setMaximumFractionDigits(4);   14. nf.setMinimumFractionDigits(2);   15. String a = nf.format(3.1415926);   16. String b = nf.format(2);   Which two statements are true about the result if the default locale is Locale.US?()

A

 The value of b is 2.00.

B

 The value of a is 3.141.

C

 The value of a is 3.14.

D

 The value of b is 2.0000.

E

 The value of a is 3.1415.

F

 The value of a is 3.1416.

G

 The value of b is 2.

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

A

 A new Item object is created with the preferred value in the id attribute.

B

 The attribute id in the Item object is modified to the new value.

C

 Compilation fails.

D

 An exception is thrown at runtime.

E

 The attribute id in the Item object remains unchanged.

单选题 Click the Exhibit button.   What is the result?()

A

 The code will deadlock.

B

 The code may run with output "2 0 6 4".

C

 The code may run with no output.

D

 The code may run with output "0 6".

E

 An exception is thrown at runtime.

F

 The code may run with output "0 2 4 6".

单选题 Given:  Which code, inserted at line 15, creates an instance of the Point class defined in Line?()

A

 Line l = new Line() ; l.Point p = new l.Point();

B

 Line.Point p = new Line.Point();

C

 The Point class cannot be instatiated at line 15.

D

 Point p = new Point();

单选题 Click the Exhibit button.   What is the output of the program shown in the exhibit? ()

A

 300-300-100-100-100

B

 300-300-300-100-100

C

 300-300-300-300-100

D

 300-100-100-100-100

最新资讯

首页 上一页 1 2 3 下一页 尾页 /

到第