Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-809 Topic 3 Question 80 Discussion

Actual exam question for Oracle's 1Z0-809 exam
Question #: 80
Topic #: 3
[All 1Z0-809 Questions]

Given the code fragment:

Stream files = Files.walk(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?

Show Suggested Answer Hide Answer
Suggested Answer: B, C

Contribute your Thoughts:

Juan
6 days ago
Hmm, I'm not sure about this one. The use of the `forEach()` method makes me think there might be a compilation error at line n1, so I'll go with B.
upvoted 0 times
...
Georgene
7 days ago
This code looks straightforward, so I think the correct answer is C. The files in the home directory should be listed along with their attributes.
upvoted 0 times
...
Pearline
11 days ago
I'm not sure, but I think option A could also be a possibility. It might list all files and directories under the home directory.
upvoted 0 times
...
Nidia
13 days ago
I agree with Scot, option C seems correct. The code is using Files.walk to list files in the home directory.
upvoted 0 times
...
Scot
21 days ago
I think the answer is C because the code is listing files in the home directory with their attributes.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77