Chinaunix首页 | 论坛 | 博客
  • 博客访问: 218323
  • 博文数量: 67
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 890
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-17 09:42
文章分类

全部博文(67)

文章存档

2010年(5)

2009年(7)

2008年(55)

我的朋友

分类: Java

2008-08-04 16:04:30

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.io.PrintWriter;

public class PrintWriterDemo {

    /**
     * @param args
     * @throws FileNotFoundException
     */
    public static void main(String[] args) throws FileNotFoundException {
        File startLog = new File("writer.txt");
        PrintWriter outWriter = new PrintWriter(new PrintStream(new FileOutputStream(startLog)));
        outWriter.println("ssss");
        outWriter.close();

    }

}
阅读(781) | 评论(0) | 转发(0) |
0

上一篇:properties demo

下一篇:JMX

给主人留下些什么吧!~~