What is the purpose of the `RandomAccessFile` class in Java?
A. It is used to read data from the keyboard
B. It is used to write data to a file
C. It is used to perform mathematical operations
D. It allows reading and writing at random positions in a file
Answer: Option D
Join The Discussion