Csc122 Week 3 Quiz

160 Words1 Pages
//Jake Roth //CISC122.N82 import java.io.*; public class Chapter19Program9Roth { public static void main(String[] args) { //Enter the root directory of the file below. Be sure to add two backslashes in-between each component. String rootDirectory = "C:\\Users\\Jake\\Desktop"; //Enter the name of the file you would like to locate in the quotes String nameOfFile = "Hello.txt"; Chapter19Program9Roth findFile = new Chapter19Program9Roth(); File newFile = new File(rootDirectory); if (findFile.findFile(rootDirectory, nameOfFile)) { System.out.println("The file was found!"); System.out.println("\nThe directory of the file is " + findFile.filePath + ".");

More about Csc122 Week 3 Quiz