提交 90e78aad 编写于 作者: 武汉红喜's avatar 武汉红喜

io

上级 7e0f9095
package org.hongxi.whatsmars.javase.io;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.PrintWriter;
/**
* Created by shenhongxi on 2018/10/25.
*/
public class FileTest {
public static void main(String[] args) throws Exception {
BufferedReader br = new BufferedReader(new FileReader("/Users/javahongxi/Documents/white_list.txt"));
PrintWriter pw = new PrintWriter("/Users/javahongxi/Documents/white_list02.txt");
String line = null;
while ((line = br.readLine()) != null) {
pw.println(line);
}
pw.flush();
pw.close();
br.close();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册