3

当我们写RandomAccessFile r =new RandomAccessFile("file.txt","rw");

如何在桌面上名为 home 的文件夹中创建此文件。再次,它应该是一个语句!

4

1 回答 1

3

'RandomAccessFile r =new RandomAccessFile("C:/Users/Siddharth Yadav/Documents/file.txt","rw");'

RandomAccessFile r =new RandomAccessFile(path_of_file,"rw"); 如果文件已经存在,则打开它,否则创建文件然后打开

于 2014-05-18T16:41:54.947 回答