Question 11

Given the code fragment:
Path source = Paths.get ("/data/december/log.txt");
Path destination = Paths.get("/data");
Files.copy (source, destination);
and assuming that the file /data/december/log.txt is accessible and contains:
10-Dec-2014 - Executed successfully
What is the result?
  • Question 12

    Given the code fragment:
    Stream<Path> files = Files.list(Paths.get(System.getProperty("user.home"))); files.forEach (fName -> {//line n1 try { Path aPath = fName.toAbsolutePath();//line n2 System.out.println(fName + ":"
    + Files.readAttributes(aPath, Basic.File.Attributes.class).creationTime ());
    } catch (IOException ex) {
    ex.printStackTrace();
    });
    What is the result?
  • Question 13

    Given:

    And given the code fragment:

    What is the result?
  • Question 14

    Given the code fragment:

    What is the result?
  • Question 15


    and the code fragment?

    What is the result?