nerdexam
Oracle

1Z0-809 · Question #1

1Z0-809 Question #1: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #1. The question stem and answer options stay visible for context.

Question

Given that /green.txt and /colors/yellow.txt are accessible, and the code fragment:
Path source = Paths.get("/green.txt");
Path target = Paths.get("/colors/yellow.txt");
Files.move(source, target, StandardCopyOption.ATOMIC_MOVE);
Files.delete(source);
Which statement is true?

Options

  • AThe green.txt file content is replaced by the yellow.txt file content and the yellow.txt file is deleted.
  • BThe yellow.txt file content is replaced by the green.txt file content and an exception is thrown.
  • CThe file green.txt is moved to the /colors directory.
  • DA FileAlreadyExistsException is thrown at runtime.

Unlock 1Z0-809 to see the answer

You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-809 Practice