Question 61

Given the code fragments:

and

What is the result?
  • Question 62

    Which code fragment is required to load a JDBC 3.0 driver?
  • Question 63

    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.txtis accessible and contains:
    10-Dec-2014 - Executed successfully
    What is the result?
  • Question 64

    Given the code fragment:

    What is the result?
  • Question 65

    Given the code fragment:
    public class FileThread implements Runnable {
    String fName;
    public FileThread(String fName) { this.fName = fName; }
    public void run () System.out.println(fName);}
    public static void main (String[] args) throws IOException,
    InterruptedException {
    ExecutorService executor = Executors.newCachedThreadPool();
    Stream<Path> listOfFiles = Files.walk(Paths.get("Java Projects"));
    listOfFiles.forEach(line -> {
    executor.execute(new FileThread(line.getFileName().toString
    ())); //
    line n1
    });
    executor.shutdown();
    executor.awaitTermination(5, TimeUnit.DAYS); //
    line n2
    }
    }
    The Java Projects directory exists and contains a list of files.
    What is the result?