package J20250725;

import java.io.*;

/**
 * @author WanJl
 * @version 1.0
 * @title Demo14_FileWriter
 * @description
 * @create 2025/7/25
 */
public class Demo14_FileWriter {
    public static void main(String[] args) throws IOException {
        FileWriter fw=new FileWriter("D:/user.txt");
        BufferedWriter bw=new BufferedWriter(fw);
        for (int i = 0; i < 10; i++) {
            bw.write("zhangsan"+i+",123456");
            //bw.write("\r\n");
            bw.newLine();
        }
        bw.flush();
        bw.close();
    }
}
