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

Oracle 1z0-819 - Java SE 11 Developer

Page: 6 / 9
Total 296 questions

Given:

Which two method implementations are correct, when inserted independently in line 1? (Choose two.)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

Given:

and

Which code fragment on line 1 makes the s1 set contain the names of all employees born before January 1, 1989?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given:

Which three classes successfully override showFirst ()?

A)

B)

C)

D)

E)

F)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

E.

Option E

F.

Option F

Given:

What needs to change to make these classes compile and still handle all types of Interface Worker?

A.

Replace Line 3 with public void addProcess (Worker w) {.

B.

Replace Line 1 with public class Main extends Thread {.

C.

Replace Line 2 with private List processes = new ArrayList<>();.

D.

Replace Line 3 with public void addProcess(T w) {.

Which command line runs the main class com.acme.Main from the module com.example?

A.

java --module-path mods com.example/com.acme.Main

B.

java –classpath com.example.jar com.acme.Main

C.

java --module-path mods -m com.example/com.acme.Main

D.

java -classpath com.example.jar –m com.example/com.acme.Main

Given:

And the command:

java Main Helloworld

What is the result ?

A.

Input: Echo:

B.

Input: Helloworld Echo: Helloworld

C.

Input:

Then block until any input comes from System.in.

D.

Input:

Echo: Helloworld

E.

A NullPointerException is thrown at run time.

Given the code fragment:

What is the result?

A.

-1 : 2

B.

2 : -1

C.

2 : 3

D.

3 : 0

Which method throws an exception for not-a-number and infinite input values?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Given:

What is the result?

A.

null

B.

Joe Bloggs

C.

The compilation fails due to an error in line 1.

D.

p1

Given this enum declaration:

Examine this code:

System.out.println(Alphabet.getFirstLetter());

What code should be written at line 3 to make this code print A?

A.

final String getFirstLetter() { return A.toString(); }

B.

static String getFirstLetter() { return Alphabet.values()[1].toString(); }

C.

static String getFirstLetter() { return A.toString(); }

D.

String getFirstLetter() { return A.toString(); }