移动端

  • 题王微信公众号

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

计算机考试 | Oracle认证考试

模式切换

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

章节目录

单选题 Given: Which statement is true if a ResourceException is thrown on line 86?()

A

Line 92 will not execute.

B

The connection will not be retrieved in line 85.

C

The resource connection will not be closed on line 88.

D

The enclosing method will throw an exception to its caller.

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

A

Compilation fails.

B

An exception is thrown at runtime.

C

Synchronizing the run() method would make the class thread-safe.

D

The data in variable "x" are protected from concurrent access problems.

E

Declaring the doThings() method as static would make the class thread-safe.

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

A

An exception is thrown at runtime.

B

Compilation fails because of an error in line 7.

C

Compilation fails because of an error in line 4.

D

Compilation succeeds and no runtime errors with class A occur.

单选题 Given: What is the appropriate definition of the hashCode method in class Person?()

A

return super.hashCode();

B

return name.hashCode() + age * 7;

C

return name.hashCode() + comment.hashCode() / 2;

D

return name.hashCode() + comment.hashCode() / 2 - age * 3;

多选题 Which two statements are true about the hashCode method?()

A

The hashCode method for a given class can be used to test for object equality and object inequality for that class.

B

The hashCode method is used by the java.util.SortedSet collection class to order the elements within that set.

C

The hashCode method for a given class can be used to test for object inequality, but NOT objecte quality, for that class.

D

The only important characteristic of the values returned by a hashCode method is that the distribution of values must follow a Gaussian distribution.

E

The hashCode method is used by the java.util.HashSet collection class to group the elements within that set into hash buckets for swift retrieval.

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

A

s 14

B

s 16

C

s 10

D

Compilation fails.

多选题 Given: Which three code fragments, inserted independently at line 6, will compile?()

A

list.add("foo");

B

Object o = list;

C

String s = list.get(0);

D

list = new ArrayList ();

单选题 Given a valid DateFormat object named df,and 16.Date d = new Date(0L); 17.String ds = "December 15, 2004"; 18.//insert code here What updates d’s value with the date represented by ds?()

A

18. d = df.parse(ds);

B

18. d = df.getDate(ds);

C

18. try {19. d = df.parse(ds);20. } catch(ParseException e) { };

D

18. try {19. d = df.getDate(ds);20. } catch(ParseException e) { };

单选题 Given that the current directory is empty, and that the user has read and write permissions, and thefollowing: Which statement is true?()

A

Compilation fails.

B

The file system has a new empty directory named dir.

C

The file system has a new empty directory named newDir.

D

The file system has a directory named dir, containing a file f1.txt.

E

The file system has a directory named newDir, containing a file f1.txt.

最新资讯

1 2 3 4 5 下一页 尾页 /

到第