java.util.scanner - How java.util.NoSuchElementException (basic program) -
java.util.nosuchelementexception problem... used 2 scanners
scanbud()
and
scabudrad()
the reason here:
scanbudrad.close();
you using multiple instances of scanner, _but closes scanner, instance close under hood input stream shared between other remaining instances... after that, trying read /get scanner object inputstream closed throws exception.
Comments
Post a Comment