多选题
Given the following from the java.io.File API:
Field Summary: static String separator
Method Summary: static File[] listRoots()
And given:
2. // insert code here
3. // insert code here
4. public class Eieio {
5. public static void main(String[] args) {
6. try {
7. String s = "subdir" + separator + "myFile.txt";
8. java.io. File f = new java.io. File(s);
9. java.io. FileReader fr = new java.io. FileReader(f);
10. java.io. File[] r = listRoots();
11. fr.close();
12. }
13. catch (Exception e) { }
14. } }
And the following four fragments:
Ⅰ. import java.io.*;
Ⅱ. import static java.io.File.*;
Ⅲ. import static java.io.File.separator;
Ⅳ. import static java.io.File.listRoots;
Which set(s) of fragments, inserted independently on lines 2 and/or 3, will compile?(Choose all that apply.)