阅读文本文件时如何跳过 3 行?以下仅显示第 3 行。我该如何通过以下方式纠正它?
表值:
michelle
98765432
michelle@hotmail.com
22
3
6,7
代码:
try
{
String line = null;
while ((line = reader.readLine()) != null)
{
if (!(line.startsWith("*")))
{
//reader.readLine();
//reader.readLine();
//display booking IDs of target customer
if (line.equals(String.valueOf(customermobilenumber)))
{
System.out.println (reader.readLine());
}
}
}
}