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

后端 未结 3 1666
花落未央
花落未央 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:24

    You are reading the line twice..

    while ((read = in.readLine()) != null) { // here
                read = in.readLine();      // and here
    

提交回复
热议问题