filewriter
filewriter Example in java
filewriter Demo
import java.io.FileWriter; import java.io.IOException; public class FileWriterDemo { public static void main(String[] args) { String fileWriterString = "e:\\abcdefghijklmnopqrstuvwxyz.TXT"; FileWriter fileWriter = null; try { fileWriter = new FileWriter(fileWriterString, true); // true for // appending // text String abc = "HELLO WORLD"; fileWriter.write(abc); } catch (IOException eIOException) { System.out .println("IOEXCEPTION IN READING THE FILE" + eIOException); } finally { try { if (fileWriter != null) { fileWriter.close(); } } catch (IOException eIOException) { System.out.println("IOEXCEPTION IN READING THE FILE" + eIOException); } } } }
Please send comments to
vgdarur.javafive@blogger.com
Copyright © 2008 - iForeRunner.com
http://www.iforerunner.com/