NoSuchElementException

后端 未结 1 1184

The program runs successfully, but once the prompt for the user to re-run the program again at the end using the while loop that encapsulates the entire program it throws a NoSu

相关标签:
1条回答
  • 2021-01-22 09:17

    Closing (e.g. scanDate.close();) the Scanner closes the underlying stream (System.in) also. You should not do that when you are not yet done with reading from the stream.

    0 讨论(0)
提交回复
热议问题