Oracle 1Z0-816 - Questions & Answers
Free preview · every answer includes a full explanation
Product page: https://prepkeys.com/1z0-816.html
Given the code fragment:
Path currentFile = Paths.get("/scratch/exam/temp.txt");
Path outputFile = Paths get("/scratch/exam/new.txt");
Path directory = Paths.get("/scratch/");
Files.copy(currentFile, outputFile);
Files.copy(outputFile, directory);
Files.delete (outputFile);
The /scratch/exam/temp.txt file exists. The /scratch/exam/new.txt and /scratch/new.txt files do not exist.
What is the result?
Which two are functional interfaces? (Choose two.)

Given the declaration:

Examine this code fragment:
/* Loc1 */ class ProcessOrders { ... }
Which two annotations may be applied at Loc1 in the code fragment? (Choose two.)
Given:

Which two interfaces can be used in lambda expressions? (Choose two.)
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?
Given these two classes:


And given this fragment:

Which describes the fragment?
Given:

Examine these requirements:
Eliminate code duplication.
Keep constant the number of methods other classes may implement from this interface.
Which method can be added to meet these requirements?

Given:

Which one is correct?
Which code fragment does a service use to load the service provider with a Print interface?
Examine these module declarations:

Which two statements are correct? (Choose two.)

