Results 1 to 1 of 1
Thread: Randomly accessing files
Randomly accessing files
Before randomly accessing a file, it has to be opened. While creating a RandomAccessFile object, you have to specify whether you want to read or read and write.
RandomAccessFile raf = new RandomAccessFile("file.txt", "r"); RandomAccessFile raf2 = new RandomAccessFile("file2.txt", "rw");