About Question enthuware.ocpjp.v8.3.1919 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
alexm1980
Posts: 4
Joined: Tue Jul 25, 2017 12:05 pm
Contact:

About Question enthuware.ocpjp.v8.3.1919 :

Post by alexm1980 »

I see in the explanation, as is see on the Java 8 documentation of walk method, that are only two overloaded walk methods. How can be option three correct, because i cannot see a walk method that takes two arguments like this:

public static Stream<Path> walk(Path start, int maxDepth)

Thanks!

admin
Site Admin
Posts: 10043
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

The method that will be used in this case is :
public static Stream<Path> walk(Path start,
int maxDepth,
FileVisitOption... options)
throws IOException

Observe that the third parameter is using the varargs format (dot dot dot), which means you can omit this parameter.
If you like our products and services, please help us by posting your review here.

alexm1980
Posts: 4
Joined: Tue Jul 25, 2017 12:05 pm
Contact:

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

Post by alexm1980 »

Yes, you are right. Completely understood. Thank you!

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests