ファイルの最終行に空白行があると、while 文の後で吹き飛ばされます。誰か助けてくれませんか?
while(in.hasNext())
{
tempPropID = in.nextInt();
tempPropType = in.next().toUpperCase();
tempPropCost = in.nextDouble();
tempAgentID = in.nextByte(WIDTH);
}
ファイルの最終行に空白行があると、while 文の後で吹き飛ばされます。誰か助けてくれませんか?
while(in.hasNext())
{
tempPropID = in.nextInt();
tempPropType = in.next().toUpperCase();
tempPropCost = in.nextDouble();
tempAgentID = in.nextByte(WIDTH);
}