试题与答案

下面是用 RandomAccessFile oureFile; Strings=

题型:填空题

题目:

下面是用
RandomAccessFile oureFile;
Strings="information to Append\n mon!\n";
oureFile=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";

试题推荐
微信公众账号搜索答案