What is the result?

Given the code fragment:
Path source = Paths.get (“/data/december/log.txt”);
Path destination = Paths.get(“/data”);
Files.copy (source, destination); and assuming that the file /data/december/log.txt is accessible and contains:
10-Dec-2014 – Executed successfully
What is the result?
A. A file with the name log.txt is created in the /data directory and the content of the /data/december/log.txt file is copied to it.
B. The program executes successfully and does NOT change the file system.
C. A FileNotFoundException is thrown at run time.
D. A FileAlreadyExistsException is thrown at run time.

Download Printable PDF. VALID exam to help you PASS.

4 thoughts on “What is the result?

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.