标签:span trace 缓存 div for dwr system line ++
public class Student { public static void main(String[] args) { // TODO Auto-generated method stub String content[] = {"好久不见","最近好吗","常联系",}; File file = new File("word.txt"); try { FileWriter fw = new FileWriter(file); BufferedWriter bufw = new BufferedWriter(fw); for(int i=0;i<content.length;i++){ bufw.write(content[i]); bufw.newLine(); } bufw.close(); fw.close(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } try { FileReader fr = new FileReader(file); BufferedReader bufr = new BufferedReader(fr); String string = null; int i=0; while((string = bufr.readLine())!=null){ i++; System.out.println("第" + i + "行" + string); } bufr.close(); fr.close(); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } } }
Bufferedreader和BufferedWriter(带缓存的输入输出)
标签:span trace 缓存 div for dwr system line ++
原文地址:https://www.cnblogs.com/dulute/p/10599177.html