java写 变量到文件

import java.io.BufferedReader;
import java.io.File;import java.io.FileReader;

import java.io.IOException;
import java.io.FileWriter;
import java.io.BufferedWriter; 
FileWriter fw = new FileWriter("F:\\data.csv",true);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(vars.get("token")+"\n");
bw.close();
fw.close();

 

package com.alibaba;
import java.io.*;
public class WiteVivabletoFile {
public static void main(String[] args) throws IOException {

FileWriter fw = new FileWriter("F:\\data.csv",true);
BufferedWriter bw = new BufferedWriter(fw);
bw.write("WOAINI");

bw.close();
fw.close();
System.out.println("zhixingwanbi");
}

}

posted on 2022-06-23 23:22  jiapengchu  阅读(132)  评论(0编辑  收藏  举报

导航