You close the second Scanner which closes the underlying InputStream, therefore the first Scanner can no longer read from the same InputStream and a NoSuchElementException results. The solution: For console apps, use ...
-
April 8, 2022
- 0 Comments