Задачу решил но так и не понял почему мы используем метод super в данном коде: public class AmigoOutputStream extends FileOutputStream{ public static String fileName = "C:/tmp/result.txt"; private FileOutputStream file; AmigoOutputStream(FileOutputStream file) throws FileNotFoundException{ super(fileName); this.file = file; } public void flush() throws IOException{ file.flush(); } public void write(int b) throws IOException{ file.write(b); } public void write(byte[] b) throws IOException{ file.write(b); } public void write(byte[] b, int off, int len) throws IOException{ file.write(b, off, len); } public void close() throws IOException{ file.flush(); String s = "JavaRush © All rights reserved."; file.write(s.getBytes()); file.close(); } public static void main(String[] args) throws FileNotFoundException { new AmigoOutputStream(new FileOutputStream(fileName)); } }