Over a million developers have joined DZone.

Write Into File

·
// Creates a file in c:/test/ and writes into that file


File outFile = new File("C:\\test\\[FILENAME]");
outFile.createNewFile();
		
BufferedWriter out = new BufferedWriter(new FileWriter(outFile));
out.write([WRITING]);
out.flush();
out.close();
		
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}