JAVA造数据

package com.bank;

import java.io.File;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

public class Test2 {
    public static void main(String[] args) throws Exception{
        try{
            File file = new File("E:/users_w_20200114.dat");
            FileOutputStream out = new FileOutputStream(file);
            OutputStreamWriter writer = new OutputStreamWriter(out,"UTF-8");
            long USER_CREDIT_LMT = 10000000L;
            for (int i=0;i<2000000;i++){
                writer.write(USERID+"|+|"+MOBILE_NUM);
                writer.write("\r\n");
                USER_CREDIT_LMT++;
            }
            writer.close();
        }catch (Exception e){
            e.printStackTrace();
        }
        System.out.println("执行完毕");
    }
}

你可能感兴趣的:(Java)