Programming with Java, part 9
1.About FileWriter classThis time I will talk about file output. There is a class calledFileWriter in the java.io package, so let's first see how touse this class.----------------------- WriteTest.java -------------------------------------import java.io.*;public class WriteTest { public static void main(String[] args) throws Exception { FileWriter fw = null; try { File file = new File("c:¥¥test¥¥test.txt"); fw = new FileWriter(file); fw.write("Hello world"); } catch(FileNotFoundException e) { System.out.println(e); } catch (IOException e) { System.out.println(e); } finally { // Close the
0