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?
A. /scratch/exam/new.txt and /scratch/new.txt are deleted.
B. The program throws a FileaAlreadyExistsException.
C. The program throws a NoSuchFileException.
D. A copy of /scratch/exam/new.txt exists in the /scratch directory and /scratch/exam/new.txt is deleted.
Which two are functional interfaces? (Choose two.)

A. Option A
B. Option B
C. Option C
D. Option D
E. Option E
Given:

What is the result?
A. The compilation fails at line 9.
B. The compilation fails at line 2.
C. Hello World
D. The compilation fails at line 8.
Given: Which statement on line 1 enables this code to compile?

A. Function
B. Function
C. Function
D. Function
E. Function f = n -> n * 2;
Given:

Which is true?
A. System.out is the standard output stream. The stream is open only when System.out is called.
B. System.in cannot reassign the other stream.
C. System.out is an instance of java.io.OutputStream by default.
D. System.in is the standard input stream. The stream is already open.
Given:

You want to use the myResource class in a try-with-resources statement. Which change will accomplish this?
A. Extend AutoCloseable and override the close method.
B. Implement AutoCloseable and override the autoClose method.
C. Extend AutoCloseable and override the autoClose method.
D. Implement AutoCloseable and override the close method.
Given:

This code results in a compilation error.
Which code should be inserted on line 1 for a successful compilation?
A. Consumer consumer = msg -> { return System.out.print(msg); };
B. Consumer consumer = var arg -> {System.out.print(arg);};
C. Consumer consumer = (String args) -> System.out.print(args);
D. Consumer consumer = System.out::print;
Given:

After which line can we insert assert i < 0 || values[i] <= values[i + 1]; to verify that the values array is partially sorted?
A. after line 8
B. after line 6
C. after line 5
D. after line 10
Given: When run and all three files exist, what is the state of each reader on Line 1?

A. All three readers are still open.
B. All three readers have been closed.
C. The compilation fails.
D. Only reader1 has been closed.