NIO.2 - Presenting the New Stream Methods - Conceptualizing Directory Walking

3 important questions on NIO.2 - Presenting the New Stream Methods - Conceptualizing Directory Walking

What is the process by which you start with a parent directory and iterate over all of its descendants until some condition is met or there are no more elements over which to iterate?

Walking or traversing a directory

Name two common strategies associated with walking a directory tree


  • depth-first, and
  • breadth-first

What strategy is used by the Streams API for traversing a directory?

Depth-first searching, with a default maximum depth of Integer.MAX_VALUE

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo