Whatwritesthetext“”totheendofthefile“file.txt”?() A.OutputStreamout=newFileOutputStream(“file.txt”); Out.writeBytes(“/n”);B.OutputStreamos=newFileOutputStream(“file.txt”,true); DataOutputStreamout=newDataOutputStream(os);out.writeBytes(“/n”);C.OutputStreamos=newFileOutputStream(“file.txt”); DataOutputStreamout=newDataOutputStream(os);out.writeBytes(“/n”);D.OutputStreamos=newOutputStream(“file.txt”,true); DataOutputStreamout=newDataOutputStream(os);out.writeBytes(“/n”);
Whatwritesthetext“”totheendofthefile“file.txt”?()
A.OutputStreamout=newFileOutputStream(“file.txt”); Out.writeBytes(“/n”);
B.OutputStreamos=newFileOutputStream(“file.txt”,true); DataOutputStreamout=newDataOutputStream(os);out.writeBytes(“/n”);
C.OutputStreamos=newFileOutputStream(“file.txt”); DataOutputStreamout=newDataOutputStream(os);out.writeBytes(“/n”);
D.OutputStreamos=newOutputStream(“file.txt”,true); DataOutputStreamout=newDataOutputStream(os);out.writeBytes(“/n”);
相关考题:
下列InputStream构造方法正确的是()。 A、InputStream in=new FileReader(“file.txt”)B、InputStream in=new FileInputStream(“file.txt”)C、InputStream in=new InputStreamFileReader (“file.txt”,“read”)D、FileInputStream in=new FileReader(new File(“file.txt”))
要想以读方式打开文件“D:\File.txt”,以下不能实现目的的语句是()。A、ifstreaminf("D:\\FilEtxt",ios::in);B、ifstreaminf("D:\\File.txt");C、ofstreaminf("D:\\File.txt",ios::out);D、fstreaminf("D:\\File.txt",ios::in|ios::out);
WhichtwoconstructanOutputSreamthatappendstothefile“file.txt”?() A.OutputStreamout=newFileOutputStream(“file.txt”);B.OutputStreamout=newFileOutputStream(“file.txt”,“append”);C.FileOutputStreamout=newFileOutputStream(“file.txt”,true);D.FileOutputStreamout=newFileOutputStream(newfile(“file.txt”));E.OutputStreamout=newFileOutputStream(newFile(“file.txt”)true);
WhichtwocreateanInputStreamandopenfilethe“file.txt”forreading?() A.InputStreamin=newFileReader(“file.txt”);B.InputStreamin=newFileInputStream(“file.txt”);C.InputStreamin=newInputStreamFileReader(“file.txt”,“read”);D.FileInputStreamin=newFileReader(newFile(“file.txt”));E.FileInputStreamin=newFileInputStream(newFile(“file.txt”));
Whichgetsthenameoftheparentdirectoryfile“file.txt”?() A.Stringname=File.getParentName(“file.txt”);B.Stringname=(newFile(“file.txt”)).getParent();C.Stringname=(newFile(“file.txt”)).getParentName();D.Stringname=(newFile(“file.txt”)).getParentFile();E.Directorydir=(newFile(“file.txt”)).getParentDir();Stringname=dir.getName();
??有一台系统为Windows Server 2008的计算机,用户john属于本地组group1,管理员创建了一个文件file.txt,并设置本地组group1对file.txt具有完全控制权限,设置john对file.txt具有拒绝读取权限,最终john对file.txt具有()权限。A.完全控制B.读取C.拒绝读取D.读取和写入
下列打开文件的语句中,能创建文件的选项包括()。A.ofstream f("file.txt", ios::out);B.ofstream f("file.txt");C.fstream f("file.txt", ios::out);D.ifstream f("file.txt",ios::out);
在Windows系统中,下列语句中,可用于读取当前目录下的data目录中的file.txt文件的是()A.with open('data/file.txt', 'r') as f:B.with open('datafile.txt', 'r') as f:C.with open('datafile.txt', 'r') as f:D.with open('data//file.txt', 'r') as f:
17、下面哪些选项能够创建一个OutputStream流,并且可以将内容附加到“file.txt”文件中?()A.OutputStream out=new FileOutputStream(“file.txt”);B.OutputStream out=new FileOutputStream(“file.txt”,”append”);C.FileOutputStream out=new FileOutputStream(“file.txt”,true);D.FileOutputStream out=new FileOutputStream(“file.txt”);