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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -