Question 96
Given the code fragment:
Which code fragment replaces the for statement?
Question 97
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?
Question 98
Which two describe reasons to modularize the JDK? (Choose two.)
Question 99
Which code fragment represents a valid Comparatorimplementation?
Question 100
And the code fragment:
Which situation will occur on code fragment execution?

