Question 16

Given:

What is the result?
  • Question 17

    Given the code fragment:
    Path currentFile = Paths.get("/scratch/exam/temp.txt");
    Path outputFile = Paths get("/scratch/exam/new.txt");
    Path directory = Paths.get("/scratch/");
    Files.copy(currentFile, outputFile);
    Files.copy(outputFile, directory);
    Files.delete (outputFile);
    The /scratch/exam/temp.txt file exists. The /scratch/exam/new.txt and /scratch/new.txt files do not exist.
    What is the result?
  • Question 18

    Which describes a characteristic of setting up the Java development environment?
  • Question 19

    Given:

    What must be added in line 1 to compile this class?
  • Question 20

    Given:

    What is the result?