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!
About Question enthuware.ocpjp.v8.3.1919 :
Moderator: admin
-
- Posts: 4
- Joined: Tue Jul 25, 2017 12:05 pm
- Contact:
-
- Site Admin
- Posts: 10055
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.3.1919 :
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.
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.
-
- Posts: 4
- Joined: Tue Jul 25, 2017 12:05 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.3.1919 :
Yes, you are right. Completely understood. Thank you!
Who is online
Users browsing this forum: No registered users and 39 guests