1.
Given the code fragment: What is the result, if the file salesreport.dat does not exist?
2.
Given the code fragment: If the file userguide.txt does not exist, what is the result?
3.
Given that myFile.txt contains: What is the result?
4.
Given the code fragment: Which code fragment inserted at line ***, enables the code to compile?
5.
Given the code fragment: Why is there no output when otherMethod is called?
6.
Given that myfile.txt contains: What is the result?
7.
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?
8.
Given the code fragment: What is the result when the result.txt file already exists in c:\student?
9.
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?
10.
Given: What is the result?