Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

Oracle 1z0-808 - Java SE 8 Programmer I

Page: 1 / 7
Total 224 questions

Given the code fragment:

Which code fragment, inserted at line n1, prints The Top element: 30?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Given the code fragment:

What is the result?

A.

May 04, 2014T00:00:00.000

B.

2014-05-04T00:00: 00.000

C.

5/4/14T00:00:00.000

D.

An exception is thrown at runtime.

Given the code fragment:

Which action enables it to print AB?

A.

Comment lines 18 to 21.

B.

Comment line 20.

C.

Comment line 19.

D.

Comment line 16.

Given:

What is the result?

A.

BaseDerivedA

B.

BaseDerivedB

C.

DerivedBDerivedB

D.

DerivedBDerivedA

E.

A ClassCastException is thrown at runtime.

Given this class:

And given this main method, located in another class:

Which three pieces of code, when inserted independently, set the value of amount to 100?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

F.

Option F

Given:

What is the result?

A.

97 9899 100 null null null

B.

97 9899 100 101 102 103

C.

Compilation fails.

D.

A NullPointerException is thrown at runtime.

E.

An ArraylndexOutOfBoundsException is thrown at runtime.

Given the code fragment:

Which option represents the state of the num array after successful completion of the outer loop?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given these classes:

And given this main method:

Which two options compile when placed at line n1 of the main method? (Choose two.)

A.

director.stockOptions = 1_000;

B.

employee.salary = 50_000;

C.

manager.budget = 1_000_000;

D.

manager.stockOption = 500;

E.

employee.budget = 200_000;

F.

director.salary = 80_000;

Given the code fragment:

What is the result?

A.

1:2:3:4:5:

B.

1:2:3:

C.

Compilation fails.

D.

An ArrayOutOfBoundsException is thrown at runtime.

Which statement will empty the contents of a StringBuilder variable named sb?

A.

sb. deleteAll ();

B.

sb. delete (0, sb. size () );

C.

sb. delete (0, sb. length () );

D.

sb. removeAll ();