我正在尝试从 Java 文件中读取一些行。我在文件中有 4 行,但问题是它只读取了 2 行。这是代码:
BufferedReader flux_in = new BufferedReader(new InputStreamReader(new FileInputStream("abc.txt")));
String line;
while (flux_in.readLine() != null)
{
line = flux_in.readLine();
System.out.println(line);
}