问题
单项选择题
随机文件流用( )接口来实现。
A.DataInput和DataOutput
B.ObjectInput
C.DataInput
D.DataOutput
答案
参考答案:A
解析: 文件操作中经常需要RandomAccessFile类提供的随机访问文件的功能,它继承自 Object类,用DataInput和DataOutput接口来实现。
随机文件流用( )接口来实现。
A.DataInput和DataOutput
B.ObjectInput
C.DataInput
D.DataOutput
参考答案:A
解析: 文件操作中经常需要RandomAccessFile类提供的随机访问文件的功能,它继承自 Object类,用DataInput和DataOutput接口来实现。