标签:
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(); } } }
标签:
原文地址:http://www.cnblogs.com/qiaomu/p/4412191.html