正确生成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")
正确生成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