Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: wrapped to functions

...

Code Block
bgColor#ffcccc
langjava
public void fio54_nce(String filename) = // Name of file to write
throws FileNotFoundException{
    OutputStream out = new FileOutputStream(filename);
    // Work with FILE
}

If the file existed before being opened, its former contents will be overwritten with the contents provided by the program.

...

Code Block
bgColor#ffcccc
langjava
public void fio54_nce(String filename) = // Name of file to write
throws FileNotFoundException{
	OutputStream out = new FileOutputStream(filename, true);
	// Work with FILE
}

If the file existed before being opened, its new contents will be appended to the former contents. This code is compliant only if this was the intention of the programmer.

...