Java Write File
Chapter:
Miscellaneous
Last Updated:
25-10-2016 19:01:23 UTC
Program:
/* ............... START ............... */
import java.io.*;
public class JavaWriteFile {
public static void main(String[] args) {
try {
BufferedWriter out = new BufferedWriter(new FileWriter("outfilename"));
out.write("JavaScan.com");
out.close();
System.out.println("File created successfully");
} catch (IOException e) {
}
}
}
/* ............... END ............... */
Output
File created successfully
Tags
Java Write File, Java, Miscellaneous