文件逐行讀取逐行寫入

BufferedReader in = new BufferedReader(new FileReader("in.txt"));
PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("out.txt")));
String s;
while((s=in.readLine())!=null){
    out.println(s);
}
in.close();
out.close();it

相關文章
相關標籤/搜索