BufferedReader is skipping every other line when reading my file in java

后端 未结 3 1658
花落未央
花落未央 2020-11-29 13:38

So Im working of reading a file containing appointments that I wrote to earlier in my code. I want to sift through the text file and find appointments on a certain date and

3条回答
  •  粉色の甜心
    2020-11-29 14:02

    You have error here:

    while ((read = in.readLine()) != null) 
     read = in.readLine();
    

    you should keep the read = in.readLine() in the while. and remove the other line.

提交回复
热议问题