我有一个像这样的缓冲阅读器:
BufferedReader br = BufferedReader(new FileReader(("Output/pointsSorted.txt")));
String line;
while((line = br.readLine()) != null){
System.out.println(br.readLine());
}
br.close();
}
但它只读取每隔一行,我不明白为什么。
这是读者从中读取的文件:
bendsan: 1000
gotr_gotey: 87
lordelain: 87
nightbot: 87
vellsain: 87
r3l10n: 86
skalrayi: 85
brom13: 84
llecrezzef: 84
cloudinger: 74
littleangelswing: 60
n3belmacht: 43
mrscandy_: 32
sluckzz: 31
elboy717: 30
assassinenfan: 18
msurai: 18
woischdesdu: 16
daspaddy: 14
sirfullmetal: 10
daranun: 1
这是输出:
gotr_gotey: 87
nightbot: 87
r3l10n: 86
brom13: 84
cloudinger: 74
n3belmacht: 43
sluckzz: 31
assassinenfan: 18
woischdesdu: 16
sirfullmetal: 10
正如你所看到的,每一行都被跳过。