Oracle Java SE 11 Programmer II - 1Z1-816 Exam Practice Test

Given:

and
checkQuality(QUALITY.A);
and

Which code fragment can be inserted into the switch statement to print Best?
Correct Answer: C
Which interface in the java.util.function package will return a void return type?
Correct Answer: C
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Given:

Which two interfaces can be used in lambda expressions? (Choose two.)
Correct Answer: D,E
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Which two are functional interfaces? (Choose two.)
Correct Answer: A,E
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Given:

Which statement on line 1 enables this code fragment to compile?
Correct Answer: C
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Given:

What is the result?
Correct Answer: D
Explanation: Only visible for TrainingDump members. You can sign-up / login (it's free).
Given the declaration:

Examine this code fragment:
/* Loc1 */ class ProcessOrders { ... }
Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)
Correct Answer: B,D
Given:
LocalDate d1 = LocalDate.of(1997,2,7);
DateTimeFormatter dtf =
DateTimeFormatter.ofPattern( /*insert code here*/ );
System.out.println(dtf.format (d1));
Which pattern formats the date as Friday 7th of February 1997?
Correct Answer: C
0
0
0
0