nerdexam
Oracle

1Z0-809 · Question #85

1Z0-809 Question #85: Real Exam Question with Answer & Explanation

Sign in or unlock 1Z0-809 to reveal the answer and full explanation for question #85. The question stem and answer options stay visible for context.

Question

The data doc, data.txt and data.xml files are accessible and contain text. Given the code fragment: Stream<Path> paths = Stream.of (Paths.get ("data.doc"), Paths.get ("data.txt"), Paths.get ("data.xml")); paths.filter (s -> s.toString().endsWith("txt")).forEach ( s -> { Files.readAllLines(s) .stream() .forEach (System.out::println); //line n1 } catch (IOException e) { System.out.println ("Exception"); } ); What is the result?

Options

  • AThe program prints the content of data.txt file.
  • BThe program prints: Exception <<The Content of the data.txt file>> Exception
  • CA compilation error occurs at line n1.
  • DThe program prints the content of the three files.

Unlock 1Z0-809 to see the answer

You've previewed enough free 1Z0-809 questions. Unlock 1Z0-809 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 1Z0-809 Practice