-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharArrayWriter.java
More file actions
24 lines (22 loc) · 549 Bytes
/
CharArrayWriter.java
File metadata and controls
24 lines (22 loc) · 549 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package sepidsal;
import java.io.*;
/**
*
* @author Sepideh Saljooghi
*/
public class CharArrayWriter {
public static void main(String args[]){
try{
FileWriter fileW = new FileWriter("C:\\sepidsal.txt");
CharArrayWriter chaw = new CharArrayWriter();
String S = "Sepid Sal";
chaw.write(S);
chaw.writeTo(fileW);
fileW.close();
System.out.print("Success");
}
catch(Exception e){
System.out.print(e);
}
}
}