So....I want to create a random access file. The thing is, I know pretty much nothing about writing to files.
What I do know is this:
1. There are two ways to write to a file - PrintWriter and FileWriter.
2. PrintWriter cannot append to a file; it can only overwrite the entire file.
3. PrintWriter can format output ("printf"). This is necessary for a random access file because each field has to have the same length.
4. FileWriter can append to a file by passing a boolean argument through its overloaded constructor.
5. FileWriter cannot format the input (printf or writef do not exist).
At least one of those is wrong, or else it would be impossible to create a random access file.
So what's wrong there? And how do you make a random access file?