менял разное, дома все работает и true дописывает
package com.javarush.task.task32.task3210;
import java.io.IOException;
import java.io.RandomAccessFile;
/*
Используем RandomAccessFile
*/
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String... args) throws IOException {
// args = new String[]{"C:\\someFile0.txt", "16", "jopa"};
String fileName = args[0];
long number = Integer.parseInt(args[1]);
String text = args[2];
try (RandomAccessFile raf = new RandomAccessFile(fileName, "rw")) {
raf.seek(Math.min(raf.length(), number));
byte buf[] = new byte[text.getBytes().length];
int len = raf.read(buf, 0, text.getBytes().length);
String getsText = new String(buf, 0, len);
raf.seek(raf.length());
raf.write((text.equals(getsText) ? "true" : "false").getBytes());
}
}
}