将结果写入文件


FileWriter writer;
try{
    writer=new FileWriter("C:\\2020年项目\\双旦活动\\data\\token.txt",true);
    writer.write(args[0]);
    writer.write("\r\n");
    writer.flush();
    writer.close();
    }catch(IOException e){
        e.printStackTrace();
        }

 

1 FileWriter fstream =new FileWriter("K:\\id.txt",true);
2 BufferedWriter out=new BufferedWriter(fstream);
3 out.write(args[0]+"\n");
4 out.close();
5 fstream.close();

 

posted @ 2020-11-30 08:38  那个谁呢  阅读(168)  评论(0编辑  收藏  举报