...
Code Block | ||||
---|---|---|---|---|
| ||||
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 | ||||
---|---|---|---|---|
| ||||
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.
...