How to append to a text file in android?

后端 未结 1 1917
遥遥无期
遥遥无期 2020-12-06 11:31
FileWriter f;
try {
 f = new FileWriter(Environment.getExternalStorageDirectory()+
                 \"/Text/o1\"+\".txt\");
     f.write(\"Hello World\");
 f.flush()         


        
相关标签:
1条回答
  • 2020-12-06 12:27

    Use FileWriter(File file,boolean append) constructor while creating FileWriter.

    0 讨论(0)
提交回复
热议问题