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?
An application is waiting for notification of changes to a tmp directory using the following code statements:
Path dir = Paths.get("tmp")
WatchKey key = dir.register (watcher, ENTRY_CREATE, ENTRY_DELETE, ENTRY_MODIFY) ;
In the tmp directory, the user renames the file testA to testB,
Which statement is true?