Hello ,
In description of "enthuware.ocpjp.v8.3.1920" , you mentioned that Files.walk walks the directory in a depth first manner, which means, it processes the children of a directory first before moving to the sibling of the directory.
Accordingly the correct answer should be
a
a/b
a/b/parent
a/a.java
which is different that the selected correct answer option 4.
Kindly clarify.
About Question enthuware.ocpjp.v8.3.1918 :
Moderator: admin
-
- Posts: 124
- Joined: Wed Feb 12, 2014 2:44 am
- Contact:
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.3.1918 :
parent is not a real directory inside b. It is a symbolic link. The first line of the explanation says, "///Files.walk/// method does not follow symbolic links by default.", so there is no reason why it will print a/b/parent after a/b.
HTH,
Paul.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 124
- Joined: Wed Feb 12, 2014 2:44 am
- Contact:
Re: About Question enthuware.ocpjp.v8.3.1918 :
Hello ,
Thanks for your response.
Regardless the parent itself.
Files.walk walks the directory in a depth first manner which means a/b should be processed before a/a.java and that is different than your selected correct answer.
Kindly clarify.
Thanks for your response.
Regardless the parent itself.
Files.walk walks the directory in a depth first manner which means a/b should be processed before a/a.java and that is different than your selected correct answer.
Kindly clarify.
-
- Site Admin
- Posts: 10066
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.3.1918 :
Your interpretation of depth first is incorrect. Depth first simply means it will first process the whichever item it picks first, fully before moving to the next sibling. It doesn't imply anything about ordering. a/b and a/a.java are at the same level. There is no guarantee which one will be picked first. What is guaranteed is that whenever a/b is picked, it will process a/b completely (i.e. it will go inside a/b) before moving to a/a.java.
I will suggest you to google "depth first algorithm" to get a more clear understanding.
HTH,
Paul.
I will suggest you to google "depth first algorithm" to get a more clear understanding.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 124
- Joined: Wed Feb 12, 2014 2:44 am
- Contact:
Re: About Question enthuware.ocpjp.v8.3.1918 :
You are right.
Thanks for clarification.
Thanks for clarification.
Who is online
Users browsing this forum: Bing [Bot] and 206 guests