网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
以下对Read()和ReadLine()方法的叙述中正确的是 ()。
A.Read()方法一次只能从输入流中读取一个字符
B.Read()方法可以从输入流中读取一个字符串
C.ReadLine()方法一次只能从输入流中读取一个字符
D.ReadLine()方法只有当用户按下回车键时返回,而Read()方法不是
参考答案和解析
A
更多 “以下对Read()和ReadLine()方法的叙述中正确的是 ()。A.Read()方法一次只能从输入流中读取一个字符B.Read()方法可以从输入流中读取一个字符串C.ReadLine()方法一次只能从输入流中读取一个字符D.ReadLine()方法只有当用户按下回车键时返回,而Read()方法不是” 相关考题
考题
以下说法哪个是错误的()
A.readlines()和readline()是一样的B.安全的做法是,使用完文件后用close将其关闭C.Xreadlines()方法遇到\n就结束,并返回D.readline()方法可以指定一个非负参数,表示读取字节数
考题
( 17 )事务 T 0 、 T 1 和 T 2 并发访问数据项 A 、 B 和 C ,下列属于冲突操作的是A)T 0 中的 read(A) 和 T 0 中的 write(A)B)T 0 中的 read(B) 和 T 2 中的 read(C)C)T 0 中的 write(A) 和 T 2 中的 write(C)D)T 1 中的 read(C) 和 T 2 中的 write(C)
考题
假设要通过read语句分别给变量a和b赋值5和7,数据键入的顺序是:57。则( )的格式是正确的(表示空格)A.read(ab)B.read(b,a)C.read(ab)D.read(a,b)
考题
下面不能从文本文件中读取数据的是()。
A.TextStream对象的Read方法B.TextStream对象的ReadLine方法C.TextStream对象的ReadAll方法D.TextStream对象的OpenAsTextStream方法
考题
对于文件的读取方法,下列叙述错误的一项是:()。
A.file.readlines([size])表示把文件的每一行作为list的一个成员,读取后返回一个listB.file.read([size])中[size]如果未给定或为负,则返回falseC.file.readline([size])表示读取整行,每操作一次读取一行D.file.read([size])表示读取指定字节数
考题
关于BufferedReader类的readLine()方法,以下说法正确的是()。A.方法readLine()每次读取一行数据B.方法readLine()每次读取一个字节C.该方法可能抛出IOException异常,调用该方法时通常应将它放到try块中,并通过catch块处理异常D.如果读到流的末尾,该方法返回的结果为null
考题
下列关于字符流的叙述中,正确的是( )。A.字符流类BufferedReader可以提高字符传送的效率B.字符输入流首先要实现DataInput接口C.字节输入流都是Reader子类D.只有字节输入流具有read( )方法,字符输入流不具有该方法。
考题
下面不能从文本文件中读取数据的有()ATextStream对象的Read方法BTextStream对象的Readline方法CTextStream对象的ReadAll方法DTextStream对象的OpenAsTextStream方法
考题
现有: 一f对一个java .io.File型实例的合法引用 一fr对‘个java.io.FileReader型实例的合法引用 一br对一个java.io.BufferedReader型实例的合法引用 和: 34. String Line=null; 35. 36. //insert code here 37. System.out.println (line); 38. } 哪一行代码插入到36行将循环通过一个文本文件并存文本域中每次输出一行?() A、 while( (line=f.read()) !=null) {B、 while( (line=fr.read()) !=null) {C、 while( (line=br.read()) !=null) {D、 while( (line=br.readLine()) !=null) {E、 while( (line=fr.readLine()) !=null) {F、 while( (line=f.readLine()) !=null) {
考题
Given that c is a reference to a valid java.io.Console object, which two code fragments read a line of text from the console?()A、String s = c.readLine();B、char[ ] c = c.readLine();C、String s = c.readConsole();D、char[ ] c = c.readConsole();E、String s = c.readLine("%s", "name ");F、char[ ] c = c.readLine("%s", "name ");
考题
下面不能从文本文件中读取数据的有()A、TextStream对象的Read方法B、TextStream对象的Readline方法C、TextStream对象的ReadAll方法D、TextStream对象的OpenAsTextStream方法
考题
下面对Read()和ReadLine()方法的描述,哪些是正确的()。A、Read()方法一次只能从输入流中读取一个字符B、使用Read()方法读取的字符不包含回车和换行符C、ReadLine()方法读取的字符不包含回车和换行符D、只有当用户按下回车键时,Read()和ReadLine()方法才会返回
考题
Given that c is a reference to a valid java.io.Console object,which two code fragments read a line of textfrom the console?()A、String s = c.readLine();B、char[] c = c.readLine();C、String s = c.readConsole();D、char[] c = c.readConsole();E、String s = c.readLine("%s", "name ");
考题
多选题Given that c is a reference to a valid java.io.Console object, which two code fragments read a line of text from the console?()AString s = c.readLine();Bchar[ ] c = c.readLine();CString s = c.readConsole();Dchar[ ] c = c.readConsole();EString s = c.readLine(%s, name );Fchar[ ] c = c.readLine(%s, name );
考题
多选题下面对Read()和ReadLine()方法的描述,哪些是正确的()。ARead()方法一次只能从输入流中读取一个字符B使用Read()方法读取的字符不包含回车和换行符CReadLine()方法读取的字符不包含回车和换行符D只有当用户按下回车键时,Read()和ReadLine()方法才会返回
考题
多选题Given that c is a reference to a valid java.io.Console object,which two code fragments read a line of textfrom the console?()AString s = c.readLine();Bchar[] c = c.readLine();CString s = c.readConsole();Dchar[] c = c.readConsole();EString s = c.readLine(%s, name );
考题
单选题现有: 一f对一个java .io.File型实例的合法引用 一fr对‘个java.io.FileReader型实例的合法引用 一br对一个java.io.BufferedReader型实例的合法引用 和: 34. String Line=null; 35. 36. //insert code here 37. System.out.println (line); 38. } 哪一行代码插入到36行将循环通过一个文本文件并存文本域中每次输出一行?()A
while( (line=f.read()) !=null) {B
while( (line=fr.read()) !=null) {C
while( (line=br.read()) !=null) {D
while( (line=br.readLine()) !=null) {E
while( (line=fr.readLine()) !=null) {F
while( (line=f.readLine()) !=null) {
考题
单选题下面不能从文本文件中读取数据的有()A
TextStream对象的Read方法B
TextStream对象的Readline方法C
TextStream对象的ReadAll方法D
TextStream对象的OpenAsTextStream方法
热门标签
最新试卷