package class1;
import java.io.File;
import java.io.FileWriter;
import java.io.Writer;
public class WriterDemo01 {
public static void main(String[] args) throws Exception{
File f = new File("d:" + File.separator + "test.txt") ;
Writer out = null ;
out = new FileWriter(f);
String str = "HelloWrold!!!";
out.write(str) ;
out.close();
}
}
import java.io.File;
import java.io.FileWriter;
import java.io.Writer;
public class WriterDemo01 {
public static void main(String[] args) throws Exception{
File f = new File("d:" + File.separator + "test.txt") ;
Writer out = null ;
out = new FileWriter(f);
String str = "HelloWrold!!!";
out.write(str) ;
out.close();
}
}