多选题在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。ABufferedReader breader=new BufferedReader(new FileReader(abc.txt));BPrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);CFileInputStream fin = new FileInputStream(“abc.txt”);DOutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));
多选题
在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。
A
BufferedReader breader=new BufferedReader(new FileReader(abc.txt));
B
PrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);
C
FileInputStream fin = new FileInputStream(“abc.txt”);
D
OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));
参考解析
解析:
暂无解析
相关考题:
下列打开文件的表达式中,错误的是( )。A.ofstream ofile;ofile.open("C:\\vc\LabC.txt",ios::binary);B.fstream iofile;iofile.open("abC.txt",ios::ate);C.ifstream ifile("C:\\vc\abC.txt");D.cout.open("C:\\vc\abC.txt",ios::binary);
下面程序的预设功能是:统计文件abc.txt中的字符个数。 include include 下面程序的预设功能是:统计文件abc.txt中的字符个数。include <iostream.h>include <fstream.h>include <stdlib.h>void main(){fstream file;file.open( "abc.txt", ios::in);if ( !file ){cout<<"Can not open abc.txt"<<end1;abort();}char ch;int i = O;while (______________){file.get(ch);i++;}cout<<"Characters : "<<i<<end1;file.close();}则程序中空白处应该填入的语句是【 】。
下列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”))
下列打开文件的表达式中,错误的是( )。A.ofstream ofile; ofile.open("C:\\vc\\abc.txt",ios: :binary);B.fstream iofile; iofile.open("abc.txt",ios::ate);C.ifstream ifile("C:\\vc\\abc.txt");D.cout.open("C:\\vc\\abc.txt",ios: :binary);
下列打开文件的表达式中,错误的是A.ofstream ofile;ofile.open("C:\\vc\\abc.txt",ios::binary);B.fstream iofile;iofile.open("abc.txt",ios::ate);C.ifstream ifile("C:\\vcXXabc.txt");D.cout.open("C:\\vc\\abc.txt",ios::binary);
若要打开A盘上user了目录下名为abc.txt的文本文件进行读、写操作,下面符合此要求的函数调用是A.fopen("A:\user\abc.txt",","r")B.fopen("A:\\user\\abc.txt","r+")C.fopen("A:\user\abc.txt","rb")D.fopen("A:\\user\\abc.txt","w")
当需要打开A盘上的abc.txt 文件用于输入时,则定义文件流对象的语句为______ 。A.fstream fin(“A: abc.txt”);B.ofstream fin (“A: abc.txt”);C.ifstream fin(“A: abc.txt”,ios:: app);D.ifstream fin(“A: abc.txt”,ios:: nocreate);
下列说法正确的是()A、diltree命令可以删除子目录下所有的文件和子目录B、copy A:/命令可以把a盘根目录下的所有文件拷贝到当前目录下C、用format目录格式化后的磁盘不能恢复D、dir c:/abc.txt/s 命令可以在整个c盘搜索abc.txt
在J2EE中,以下各项中,()正确阐述了创建inputstreamreader的方式 A、new InputStreamReader(new FileInputStream(“data”))B、new InputStreamReader (new FileReader(“data”))C、new InputStreamReader (new BufferedReader(“data”))D、new InputStreamReader ( “data”)
在J2EE中,下面代码中,()不会编译错误。 A、File f = new File("/","autoexec.bat");B、DataInputStream din = new DataInputStream(new FileInputStream("autoexec.bat"));C、InputStreamReader in = new InputStreamReader(System.in);D、OutputStreamWriter out = new OutputStreamWriter(System.in);
在J2ee中,以下各项中,()正确阐述了创建InputStreamReader的方式。 A、new InputStreamReader(new FileInputStream("data"));B、new InputStreamReader(new FileReader"data"));C、new InputStreamReader(new BufferedReader("data"));D、new FileInputStream("data")
在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。 A、BufferedReader breader=new BufferedReader(new FileReader("abc.txt"));B、PrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);C、FileInputStream fin = new FileInputStream(“abc.txt”);D、OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));
已知文本文件abc.txt,以读方式打开,下列的操作中错误的是()。A、fstreaminfile("abc.txt",ios::in)B、ifstreaminfile("abc.txt")C、ofstreaminfile("abc.txt")D、fstreaminfile;infile.open("abc.txt",ios::in)
下列打开文件的表达式中,()是错误的。A、ofstream ofile;ofile.open("abc.txt",ios::binary);B、fstream iofile;iofile.open("abc.txt",ios::ate);C、ifstream ifile("abc.txt");D、cout.open("abc.txt",ios::binary);
若要打开:A盘上user子目录下名为abc.txt的文本文件进行读、写操作,下面符合此要求的函数调用是()。A、fopen("A://user//abc.txt","r")B、fopen("A://user//abc.txt","r+")C、fopen("A://user//abc.txt","rb")D、fopen("A://userl//abc.txt","w")
Which two create an InputStream and open file the “file.txt” for reading? ()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”));E、 FileInputStream in=new FileInputStream(new File(“file.txt”));
单选题若要打开A盘上user子目录下名为abc.txt的文本文件进行读、写操作,下面符合此要求的函数调用是()。Afopen("A:/user/abC.txt","r")Bfopen("A://user//abC.txt","r+")Cfopen("A:/user/abC.txt","rb")DD.fopen("A://user//abtxt","w")
多选题在J2EE中,利用下列构造函数准备对文件abc.txt操作,但文件abc.txt在当前目录不存在,不会产生运行时错误的是()。ABufferedReader breader=new BufferedReader(new FileReader(abc.txt));BPrintWriter out = new PrintWriter(new FileWriter(“abc.txt”),true);CFileInputStream fin = new FileInputStream(“abc.txt”);DOutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(“abc.txt”));
单选题在J2EE中,以下各项中,()正确阐述了创建inputstreamreader的方式Anew InputStreamReader(new FileInputStream(“data”))Bnew InputStreamReader (new FileReader(“data”))Cnew InputStreamReader (new BufferedReader(“data”))Dnew InputStreamReader ( “data”)
单选题在J2ee中,以下各项中,()正确阐述了创建InputStreamReader的方式。Anew InputStreamReader(new FileInputStream(data));Bnew InputStreamReader(new FileReaderdata));Cnew InputStreamReader(new BufferedReader(data));Dnew FileInputStream(data)
单选题下面()命令能在屏幕上显示当前盘当前目录下文件名为ABC.TXT的文件内容。ATYPEABC.TXTCONBTYPEABC.TXTCCOPYABC.TXTCONDCOPYABC.TXT
单选题下列打开文件的表达式中,()是错误的。Aofstream ofile;ofile.open(abc.txt,ios::binary);Bfstream iofile;iofile.open(abc.txt,ios::ate);Cifstream ifile(abc.txt);Dcout.open(abc.txt,ios::binary);
多选题在J2EE中,下面代码中,()不会编译错误。AFile f = new File(/,autoexec.bat);BDataInputStream din = new DataInputStream(new FileInputStream(autoexec.bat));CInputStreamReader in = new InputStreamReader(System.in);DOutputStreamWriter out = new OutputStreamWriter(System.in);