テキスト ファイルを読むときに 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());
}
}
}
}