public static void main(String[] args) {
String path1="F:/info.txt";
String path2="F:/2.txt";
FileWriter fw=null;
FileReader fr=null;
BufferedWriter bw=null;
BufferedReader br=null;
try {
fr=new FileReader(path1);
fw=new FileWriter(path2);
bw=new BufferedWriter(fw);
br=new BufferedReader(fr);
String line=null;
while((line=br.readLine())!=null) {
bw.write(line);
bw.newLine();
}
bw.flush();
}catch (Exception e) {
// TODO: handle exception
}
}
网友评论