Place the code fragments in position to complete this method DRAG DROPPlace the code fragments in position to complete this method. DRAG DROP Place the code fragments in position to complete this method. Show Hint ← Previous question Next question →
fjbo221 static boolean doesFileExist(String[] directories, String filename) { String path = “”; // Should be “C:” on Windows for (String dir : directories) { path = path + File.separator + dir; } // System.out.println(path); File file = new File(path, filename); return file.exists(); } Reply
static boolean doesFileExist(String[] directories, String filename) {
String path = “”; // Should be “C:” on Windows
for (String dir : directories) {
path = path + File.separator + dir;
}
// System.out.println(path);
File file = new File(path, filename);
return file.exists();
}