当前位置:操作系统 > 安卓/Android >>

把String内容输出到Txt文件里

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

 


摘自 oldfeel

补充:移动开发 , Android ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,