I have no clue why not even the first requirement is met: You must use RandomAccessFile in the Solution class's main() method.