Originally posted by John Stone:
I think, that this is not needed for exam.

Why not? If you're using RandomAccessFile, you will need to create that object via its constructor, so you will need to decide whether you construct RandomAccessFile with "rw", "rwd" or "rws". So if you are using RandomAccessFile this is part of the exam.