Oracle
1Z0-804 · Question #61
Given the following code fragment: 10. p1 = paths.get("report.txt"); 11. p2 = paths.get("company"); 12. / / insert code here Which code fragment, when inserted independently at line 12, move the…
The correct answer is A. Files.move(p1, p2, StandardCopyOption. See the full explanation below for the reasoning.
Question
Given the following code fragment: 10. p1 = paths.get("report.txt"); 11. p2 = paths.get("company"); 12. / / insert code here Which code fragment, when inserted independently at line 12, move the report.txt file to the company directory,at the same level, replacing the file if it already exists?
Options
- AFiles.move(p1, p2, StandardCopyOption.
- BFiles.move(p1, p2, StandardCopyOption.
- CFiles.move(p1, p2, StandardCopyOption.
- DFiles.move(p1, p2, StandardCopyOption.
- EFiles.move (p1, p2, StandardCopyOption.
How the community answered
(57 responses)- A75% (43)
- B5% (3)
- C4% (2)
- D2% (1)
- E14% (8)
Community Discussion
No community discussion yet for this question.