Winter Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: v4s65

1z0-819 Exam Dumps - Java SE 11 Developer

Go to page:
Question # 33

Given:

What is the type of x?

A.

char

B.

List

C.

String

D.

List

Full Access
Question # 34

Which statement about a functional interface is true?

A.

It must be defined with the public access modifier.

B.

It must be annotated with @FunctionalInterface.

C.

It is declared with a single abstract method.

D.

It is declared with a single default method.

E.

It cannot have any private methods and static methods.

Full Access
Question # 35

Given:

and

checkQuality(QUALITY.A);

and

Which code fragment can be inserted into the switch statement to print Best?

A.

QUALITY.A.ValueOf()

B.

A

C.

A.toString()

D.

QUALITY.A

Full Access
Question # 36

Given:

You want to obtain the Stream object on reading the file. Which code inserted on line 1 will accomplish this?

A.

var lines = Files.lines(Paths.get(INPUT_FILE_NAME));

B.

Stream lines = Files.readAllLines(Paths.get(INPUT_FILE_NAME));

C.

var lines = Files.readAllLines(Paths.get(INPUT_FILE_NAME));

D.

Stream lines = Files.lines(INPUT_FILE_NAME);

Full Access
Question # 37

Given:

public class X {

}

and

public final class Y extends X {

}

What is the result of compiling these two classes?

A.

The compilation fails because there is no zero args constructor defined in class X.

B.

The compilation fails because either class X or class Y needs to implement the toString() method.

C.

The compilation fails because a final class cannot extend another class.

D.

The compilation succeeds.

Full Access
Question # 38

Given:

Which statement is true about the Fox class?

A.

Fox class does not have to override inhabit method, so long as it does not try to call it.

B.

Fox class does not have to override the inhabit method if Forest and Town provide compatible implementations.

C.

Fox class must implement either Forest or Town interfaces, but not both.

D.

The inhabit method implementation from the first interface that Fox implements will take precedence.

E.

Fox class must provide implementation for the inhabit method.

Full Access
Go to page: