Write a method public static clearDirectory(Path dir) that removes all files (but none of the directories) from

Question:

Write a method public static clearDirectory(Path dir) that removes all files (but none of the directories) from a directory. Be careful when testing it!

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

Step by Step Answer:

Related Book For  answer-question
Question Posted: