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

 Q3. Write a program that searches for a specific file in

Q3. 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. public static void main(Stringt] args) find ( "Animal.java", ":/121/"); c:\121\HappyFarm\ve r-6 Animal . java c:\121 HappyFarm ver_7 \Animal.java SAMPLE RUN 2: public static void main (String[ args) ( find ("dummy.txt", "c:/121/") output: Cannot find dummy.txt Q3. 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. public static void main(Stringt] args) find ( "Animal.java", ":/121/"); c:\121\HappyFarm\ve r-6 Animal . java c:\121 HappyFarm ver_7 \Animal.java SAMPLE RUN 2: public static void main (String[ args) ( find ("dummy.txt", "c:/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!