import java.io.*;
public class ToFile
{
public static void main(String[] args)
{
try
{
String filename = "out.txt";
BufferedWriter bw = new BufferedWriter(new FileWriter(filename));
bw.write("Hello,China!");
bw.write("\n");
bw.write("Hello,World!");
bw.close();
}
catch(IOException e)
{
System.out.println("IOException");
e.printStackTrace();
}
}
}
posted on 2007-10-08 21:45
jadmin 阅读(92)
评论(0) 编辑 收藏