We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dd2007 commit 4139515Copy full SHA for 4139515
FileOutputStreamExample.java
@@ -0,0 +1,18 @@
1
+import java.io.*;
2
+
3
+public class FileOutputStreamExample {
4
+ public static void main(String[] args) throws IOException {
5
+ // FileOutputStream fout = new FileOutputStream("../Java/temp.txt", true);
6
7
+ File f1 = new File("../Java/temp.txt");
8
+ FileOutputStream fout = new FileOutputStream(f1);
9
10
+ String s = "Hello World!!";
11
12
+ char ch[] = s.toCharArray();
13
+ for (int i = 0; i < s.length(); i++)
14
+ fout.write(ch[i]);
15
16
+ fout.close();
17
+ }
18
+}
0 commit comments