goback add

把String内容输出到Txt文件里

2733 点击·0 回帖
灯火互联
楼主

String str = "hello world";
                try {
                    FileWriter fw = new FileWriter(PATH + "/aa.txt");
                    fw.flush();
                    fw.write(str);
                    fw.close();
                } catch (Exception e) {
                    e.printStackTrace();
                }


喜欢0 评分0