package bbb;
import java.io.*;
public class ccc {
public static void main(String[] args) throws IOException{
String str="123456sad";
File f1=new File("D://data.txt");
FileWriter fw=new FileWriter(f1);
BufferedWriter bw=new BufferedWriter (fw);
bw.write("王程");
bw.newLine();
bw.write(str);
bw.newLine();
bw.close();
fw.close();
package wink;
import java.io.*;
public class eeeee {
public static void main(String[] args) throws IOException{
File f1 = new File("D://asd.txt");
FileReader fw = new FileReader(f1);
BufferedReader bw =new BufferedReader(fw);
String str;
while((str=bw.readLine())!=null){
System.out.println(str);
}
bw.close();
fw.close();
}
}
}
}