Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

Full Access Oracle 1z0-808 Tutorials

Page: 9 / 17
Total 224 questions

Java SE 8 Programmer I Questions and Answers

Question 33

Given the code fragments:

And:

Which statement is true?

Options:

A.

After line 11, three objects are eligible for garbage collection.

B.

After line 11, two objects are eligible for garbage collection.

C.

After line 11, one object is eligible for garbage collection.

D.

After line 11, none of the objects are eligible for garbage collection.

Question 34

Given the definitions of the MyString class and the Test class:

What is the result?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 35

Given:

What is the result?

Options:

A.

Hello Log 1:0

B.

Hello Log 2:1

C.

Welcome Log 2:1

D.

Welcome Log 1:0

Question 36

Given the code fragment:

Which code fragment, when inserted at line 9, enables the code to print true?

Options:

A.

String str2 = str1;

B.

String str2 = new String(str1);

C.

String str2 = sb1. toString();

D.

String str2 = "Duke";

Page: 9 / 17
Total 224 questions