1: import java.io.File;
2: import java.io.IOException;
3:
4: /**
5: * Created by IntelliJ IDEA.
6: * User: Owner
7: * Date: 8/6/11
8: * Time: 12:57 PM
9: */
10: public class TestCreateNewFile {
11: public static void main(String[] args) throws IOException {
12: File f = new File("scjp6exam.txt");
13: System.out.println(f.exists());
14: f.createNewFile();
15: System.out.println(f.exists());
16: }
17: }
Options :
A. Prints “ false, false”.
B. Prints “ false, true”
C. Can throw an exception at Line 14.
D. Line 15 may not be executed.