网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
正确生成RandomAccessFile对象的语句的是
A.File f=new File("readFile"); RandomAccessFile raF=new RandomAccessFile(f);
B.RandomAccessFile raF=new RandomAccessFile(d:\\mydir\\File3.txt,"rw");
C.RandomAccessFile raF=new RandomAccessFile("readwriteFile","rw");
D.RandomAccessFile raF=new RandomAccessFile("readwriteFile",rw);
参考答案
更多 “ 正确生成RandomAccessFile对象的语句的是A.File f=new File("readFile"); RandomAccessFile raF=new RandomAccessFile(f);B.RandomAccessFile raF=new RandomAccessFile(d:\\mydir\\File3.txt,"rw");C.RandomAccessFile raF=new RandomAccessFile("readwriteFile","rw");D.RandomAccessFile raF=new RandomAccessFile("readwriteFile",rw); ” 相关考题
考题
以下创建RandomAccessFile类实例对象的代码,哪些是正确的( )。
A、RandomAccessFile(newFile("D:\\itcast\\dir1\\test.java"),"rw")B、RandomAccessFile("D:\\itcast\\dir1\\test.java","r")C、RandomAccessFile("D:\\itcast\\dir1\\test.java")D、RandomAccessFile("D:\\itcast\\dir1\\test.java","wr")
考题
下列选项中,( )是FilterInputStream类构造方法的有效参数。A.无参数B.OutputStream对象C.InputStream对象D.RandomAccessFile对象
考题
正确生成RandomAccessFile对象的语句是 ( )A.File f=new File("readFile");B.RandomAccessFile raF=new RandomAcccssFile(d:\mydir\File3.txt,"rw");C.RandomAccessFile raF=new RandomAccessFile("readwriteFile","rw");D.RandomAccessFile raF=new RandomAccessFite("readwriteFile",rw)
考题
在下列程序的横线处填入正确的语句,实现RandomAccessFile类使用。 package ch1; import java. io. *; public class ex27 { public static void main(String args[] ) { try { RandomAccessFile in = new in.close ( ); } catch (Exception e) { e.printStackTrace (); } } }A.RandomAccessFileC"ch1/file.dat", "read")B.RandomAccessFile("r", "ch1/file.dat")C.RandomAccessFile("ch1/file.dat" , "r")D.RandomAecessFile("read", "ch1/file.dat")
考题
(File类)要得到某目录下的所有文件名,在下列代码的下划线处应填入的内容是(两个下划线的填写内容相同) ________。 ______ pathName=new______(args[0]); String[] fileNames=pathname.list();A.FIlelnputStreamB.FileOutputStreamC.FileD.RandomAccessFile
考题
19、下列哪个叙述是正确的?A.RandomAccessFile流一旦指向文件,就会刷新该文件。B.BufferedReader流可以指向FileInputStream流。C.创建File对象可能发生IOException异常。D.BufferedWriter流可以指向FileWirter流。
考题
28、(File类)要得到某目录下的所有文件名,在下列代码的下划线处应填入的内容是(两个下划线的填写内容相同) ________。 ______ pathName=new______(args[0]); String[] fileNames=pathname.list();A.FIlelnputStreamB.FileOutputStreamC.FileD.RandomAccessFile
热门标签
最新试卷