hiexam
oracle · 1z0-809 · Q605 · multiple_choice · topic_1

Given the code fragment: Path source = Paths.get ("/data/december/log.txt"); Path destination = Paths.get("/data"); Fil…

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

Reference: examtopics_top_comment

Practice with progress tracking

Sign in to track wrong answers, get spaced-repetition reminders, and run timed exam mode.