创建文件读取
下面是个有关读取文件的题目,请各位帮忙解决一下:
What does the following code do?
File f=new File(“hello.test”);
FileOutputStream out = new FileOutputStream(f);
Select the one right answer:
A.Create a new file named “hello.test ” 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.test ” if it does not yet exist.The file is not opened.
C.Open a file named “hello.test” so that you can write to it and read from it ,but does not creat the file if it does not yet exist.
D.Open a file named “hello.test” 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.test”,and write to and read from the file.