mirror of
https://github.com/corda/corda.git
synced 2025-01-05 20:54:13 +00:00
24 lines
486 B
Java
24 lines
486 B
Java
|
import java.io.FileOutputStream;
|
||
|
import java.io.IOException;
|
||
|
|
||
|
|
||
|
public class FileOutput {
|
||
|
|
||
|
/**
|
||
|
* @param args
|
||
|
* @throws IOException
|
||
|
*/
|
||
|
public static void main(String[] args) throws IOException {
|
||
|
FileOutputStream f = new FileOutputStream("test.txt");
|
||
|
f.write("Hello world!\n".getBytes());
|
||
|
f.close();
|
||
|
|
||
|
FileOutputStream f2 = new FileOutputStream("test.txt", true);
|
||
|
f2.write("Hello world again!".getBytes());
|
||
|
f2.close();
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|