Using the String-processing capabilities, the file and directory capabilities and a Map, create an application that recursively

Question:

Using the String-processing capabilities, the file and directory capabilities and a Map, create an application that recursively walks a directory structure supplied by the user and reports the number of files of each file type (such as .java, .txt, .class, .docx, etc.) that exist in the specified directory path. Display the filename extensions in sorted order. Next, investigate method walk of class the Files. This method returns a stream that walks a directory and its subdirectories and returns the contents to you as a stream. Then, reimplement the first part of this exercise, using lambdas and streams, rather than recursion.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Java How To Program Late Objects Version

ISBN: 9780136123712

8th Edition

Authors: Paul Deitel, Deitel & Associates

Question Posted: