public static void main(String[] args) throws IOException {
BufferedWriter bw=new BufferedWriter(new FileWriter("/home/sundi/桌面/lll.txt"));
bw.write("沟"+"\n");
bw.write("猫"+"\n");
bw.write("老鼠"+"\n");
bw.close();
}
public static void main(String[] args) throws IOException {
BufferedReader br=new BufferedReader(new FileReader("/home/sundi/桌面/lll.txt"));
String str;
while ((str=br.readLine())!=null){
System.out.println(str);
}
br.close();
}