Java IO Serialization

© examsiri.com
Question : 16 of 17
 
Marks: +1, -0
Given:
import java.io.*;
class Directories {
  static String [] dirs = {"dir1", "dir2"};
  public static void main(String [] args) {
   for (String d : dirs) {
    /* insert code 1 here*/
    File file = new File(path, args[0]);
    /* insert code 2 here*/
   }
  }
}

and that the invocation
java Directories file2.txtis issued from a directory that has two subdirectories, "dir1" and "dir1", and that "dir1" has afile "file1.txt" and "dir2" has a file "file2.txt", and the output is "false true",
which set(s) of code fragments must be inserted? (Choose all that apply.)
Go to Question: