移动端

  • 题王微信公众号

    题王微信公众号

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

计算机考试 | Oracle认证考试

模式切换

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

章节目录

单选题 Given: 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();

多选题 Given: 35.String #name = "Jane Doe"; 36.int $age = 24; 37.Double _height = 123.5; 38.double ~temp = 37.5; Which two statements are true?()

A

Line 35 will not compile.

B

Line 36 will not compile.

C

Line 37 will not compile.

D

Line 38 will not compile.

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

A

Compilation fails.

B

An exception is thrown at runtime.

C

doStuff x = 6 main x = 6

D

doStuff x = 6 main x = 7

E

doStuff x = 7 main x = 6

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

A

All of the assert statements are used appropriately.

B

Only the assert statement on line 12 is used appropriately.

C

Only the assert statement on line 15 is used appropriately.

D

Only the assert statements on lines 15 and 18 are used appropriately.

多选题 Given that c is a reference to a valid java.io.Console object,which two code fragments read a line of textfrom the console?()

A

String s = c.readLine();

B

char[] c = c.readLine();

C

String s = c.readConsole();

D

char[] c = c.readConsole();

E

String s = c.readLine(%s, name );

单选题 Given: Which statement is true about the objects referenced by snoog, snooch, and booch immediately after line23 executes?()

A

None of these objects are eligible for garbage collection.

B

Only the object referenced by booch is eligible for garbage collection.

C

Only the object referenced by snoog is eligible for garbage collection.

D

Only the object referenced by snooch is eligible for garbage collection.

E

The objects referenced by snooch and booch are eligible for garbage collection.

单选题 Given two files, GrizzlyBear.java and Salmon.java: If both classes are in the correct directories for their packages,and the Mammal class correctly defines thefindSalmon() method, which change allows this code to compile?()

A

add import animals.mammals.*; at line 2 in Salmon.java

B

add import animals.fish.*; at line 2 in GrizzlyBear.java

C

add import animals.fish.Salmon.*; at line 2 in GrizzlyBear.java

D

add import animals.mammals.GrizzlyBear.*; at line 2 in Salmon.java  B

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

A

int Long

B

Short Long

C

Compilation fails.

D

An exception is thrown at runtime.

最新资讯

首页 上一页 1 2 3 4 5 尾页 /

到第