【发布时间】:2019-06-24 07:57:05
【问题描述】:
我有一个例外NoSuchElementException;
我的程序本身没有完成,但我无法弄清楚这个错误,我知道这是个小问题 它与 int 输入有关。我不确定我是否遗漏了什么
int low= in.nextInt();
in.nextLine();
System.out.println(low);
int high= in.nextInt();
in.nextLine();
System.out.println(high);
int secretNum= in.nextInt();
in.nextLine();
System.out.println(secretNum);
int [] arr= new int [high];
【问题讨论】:
-
我添加了一个 System.out.println();它解决了它!
标签: exception nosuchelementexception