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

Oracle 1z0-819 - Java SE 11 Developer

Page: 9 / 9
Total 296 questions

Given this requirement:

Module vehicle depends on module part and makes its com.vehicle package available for all other modules.

Which module-info.java declaration meets the requirement?

A.

Option A

B.

Option B

C.

Option C

D.

Option D

You replace the code on line 1 to use ParallelStream.

Which one is correct?

A.

The code will produce the same result.

B.

The compilation fails.

C.

A NoSuchElementException is thrown at run time.

D.

The code may produce a different result.

Which three initialization statements are correct? (Choose three.)

A.

int[][][] e = {{1,1,1},{2,2,2}};

B.

short sh = (short)’A’;

C.

float x = 1f;

D.

byte b = 10;

char c = b;

E.

String contact# = “(+2) (999) (232)”;

F.

int x = 12_34;

G.

boolean false = (4 != 4);

Given the code fragment:

What is the result?

A.

01

B.

0

C.

1

D.

The program prints nothing.

E.

It prints 1 in the infinite loop.

Given:

Which three actions implement Java SE security guidelines? (Choose three.)

A.

Change line 7 to return names.clone();.

B.

Change line 4 to this.names = names.clone();.

C.

Change the getNames() method name to get$Names().

D.

Change line 6 to public synchronized String[] getNames() {.

E.

Change line 2 to private final String[] names;.

F.

Change line 3 to private Secret(String[] names) {.

G.

Change line 2 to protected volatile String[] names;.

Given the code fragment:

What is the result?

A.

2

B.

-1

C.

1

D.

-3

Given:

Which statement on line 1 enables this code to compile?

A.

Consumer function = (String f) -> (System.out.println(f);};

B.

Supplier function = () -> fruits.get (0);

C.

Predicate function = a -> a.equals("banana");

D.

Function function = x -> x.substring(0,2);

Given:

What is the result?

A.

Joe

null

B.

null

Mary

C.

Joe

Marry

D.

null

null