Question: Java help thanks Write a program that searches for a specific file in a given folder and prints out the paths of all files in

Java help thanks Write a program that searches for a specific fileJava help thanks

Write a program that searches for a specific file in a given folder and prints out the paths of all files in that folder with the given filename. If the file cannot be not found, your program should print a message "File cannot be found", where is the name of your file. Use recursion in your solution. SAMPLE RUN 1: public static void main (String[] args) find ( "Aninal.java", "c./121/"); output: c:\121 HappyFarm\ver 6 \Animal.java c:1121 HappyFarmlver 7 Animal.java SAMPLE RUN 2: public static void main (String[] args) find ( "dummy . txt", "./121/"); Output: Cannot find dummy.txt Write a program that searches for a specific file in a given folder and prints out the paths of all files in that folder with the given filename. If the file cannot be not found, your program should print a message "File cannot be found", where is the name of your file. Use recursion in your solution. SAMPLE RUN 1: public static void main (String[] args) find ( "Aninal.java", "c./121/"); output: c:\121 HappyFarm\ver 6 \Animal.java c:1121 HappyFarmlver 7 Animal.java SAMPLE RUN 2: public static void main (String[] args) find ( "dummy . txt", "./121/"); Output: Cannot find dummy.txt

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!