[java基础复习]BufferedReader的readLine()方法读取内容,发现缺失
错误的写法: BufferedReader reader = new BufferedReader(new FileReader(file)); while (reader.readLine() != null) { String line = reader.readLine(); System.out.println("line = " + line); }发现读取到的内容缺失了几行.
原创
2021-09-13 05:54:40 ·
2129 阅读 ·
1 评论