NoSuchElementException with Java.Util.Scanner

前端 未结 7 585
感动是毒
感动是毒 2020-11-22 14:38

I am very new to Java but am working through the book Java: How to program (9th ed.) and have reached an example where for the life of me I cannot figure out what the proble

相关标签:
7条回答
  • 2020-11-22 15:18

    If I may, I solved this issue today by realizing that I had multiple functions that used an instance of a Scanner, each. So basically, try refactoring so that you have only one instance opened and then closed in the end - this should work.

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