Page 1 of 1

About Question enthuware.ocpjp.v8.2.1652 :

Posted: Thu Aug 25, 2016 9:46 am
by brunesto
The implementation provided in the explanation will only work for leaves in the directory tree, but not for any directory that contains sub directories, because the count variable is reset every time it enters a new directory.

from the javadoc:
postVisitDirectory(T dir, IOException exc)
Invoked for a directory after entries in the directory, *and all of their descendants,* have been visited.

BTW in general the questions and explanations are usually very good, i am very satisfied , thanks

Re: About Question enthuware.ocpjp.v8.2.1652 :

Posted: Thu Aug 25, 2016 11:47 am
by admin
Hi,
Are you sure enthuware.ocpjp.v8.2.1652 is correct question id because I couldn't find any question by this id?

Paul.

Re: About Question enthuware.ocpjp.v8.2.1652 :

Posted: Fri Aug 26, 2016 10:18 am
by brunesto
Hi,
Yes the questionbank is com.enthuware.ets.ocp-jp.upgrade.1z0-813, question id enthuware.ocpjp.v8.2.1652
If it helps, here is the text of the question: "You need to recursively traverse through a given directory structure. After visiting each directory, you want print the number of files visited in that directory. Which three methods of FileVisitor will be helpful in implementing this requirement?"

Bruno

Re: About Question enthuware.ocpjp.v8.2.1652 :

Posted: Fri Aug 26, 2016 8:43 pm
by admin
OK, I got it.
You are right. The example has issues. I have removed it.

thank you for your feedback!
Paul.