Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started