public class Test
{
public static void main(String[] args) throws FileNotFoundException
{
Scanner input = new Scanner("text.txt");
int x = input.nextInt();
}
}
text.txt 是:
8
8
6
7
此代码引发InputMismatch
异常。为什么?