posted 22 years ago
i dont know why the answer is e?
File f = new File("hello.txt");
FileOutputStream out = new FileOutputStream(f);
Select the one right answer.
[a] Create a new file named "hello.txt" if it does not yet exist. It also opens the file so you can write to it and read from it.
[b] Create a new file named "hello.txt" if it does not yet exist.The file is not opened.
[c] Open a file named "hello.txt" so that you can write to it and read from it, but does not create the file if it does not yet exist.
[d] Open a file named "hello.txt" so that you can write to it but cannot read from it.
[e] Create an object that you can now use to create and open the file named "hello.txt" and write to and read from the file.
Answer 11
[e] Create an object that you can now use to create and open the file named "hello.txt," and write to and read from the file.