问题
单项选择题
在下列程序的横线处填入正确的语句,实现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/fildat", "read")
B.RandomAccessFile("r", "ch1/fildat")
C.RandomAccessFile("ch1/fildat" , "r")
D.RandomAecessFile("read", "ch1/fildat")
答案
参考答案:C