Добрый день! Почему вот так валидатор принимает метод close():
public void close() throws IOException{
        stream.flush();
        stream.write("JavaRush © All rights reserved.".getBytes());
        stream.close();
    }
а вот так, выдает ошибку? пишет, что не ту строку дозаписываю
public class AmigoOutputStream extends FileOutputStream {
   ....
    public String to_write = "JavaRush © All rights reserved.";
    public byte[] to_write_array = to_write.getBytes();
    ....
    public void close() throws IOException{
        stream.flush();
        stream.write(to_write_array);
        stream.close();
    }
....
Просто же разбиваю одну операцию на несколько шагов и все