描述字符串写入文件

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;


public class Text {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        try {
            FileOutputStream out =new FileOutputStream("FileName.txt");
        
                out.write("字符串写入文件".getBytes());
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        
        
    }

}

 

posted @ 2015-04-09 21:21  ~每天进步一点点~  阅读(154)  评论(0编辑  收藏  举报