I have written code on my machine it works, it also works on some online IDE but it shows Run error whenever I try to submit it. It has also happening with some of the codes that I’ve written and were accepted earlier.
I think there’s some problem with Coding Blocks IDE(Java), please help me with this
Compiler Shows Run Error
Its not showing in every problem, but in few of the problems
Static scanner will give error , dont use scanner as parameter or multiple Scanners , ( works fine on Eclipse But NoSuchElementException is found on online judge )
there’s no benefit to creating more than one Scanner object. It’s simply reading input from a stream, and having more than one reference to that stream isn’t necessary or beneficial to your operations.
take input in the main only