A-A+

下面是用 RandomAccessFile oureFile; Strings=infor

2022-08-12 19:30:31 问答库 阅读 197 次

问题详情

下面是用 RandomAccessFile oureFile; Strings="information to Appendn mon!n"; ureFile=newRandomAccessFile oureFile("phone.number,numbers","rw"); 模式打开访问oureFile文件,并在文件尾加信息s的addFile的源程序。请在下划线处填 上适当的语句将程序补充完整。 import java.io.*; Class addFile { public static void main (String args[])throws IOException { RandomAccessFile oureFile; _____________ =oureFile=new RandomAccessFile oureFile("phone.number,numbers","rw"); oureFile.seek(oureFile.length()); oureFile.writebytes(s); oureFile.close(); }


请帮忙给出正确答案和分析,谢谢!

参考答案

正确答案:String="information to Append\n mon !\n";
String="informationtoAppend\nmon!\n";

考点: