0
what is wrong with this code please? search scanner object in code playground - Michael Obeng
6 odpowiedzi
+ 2
Itay is wrong actually. Scanner works in play ground just fine. Only issue with your code is the space after you put Scanner (System.in). Just remove the space to Scanner(System.in) and it works.
+ 1
That is true, the white space should not be a problem normally.
+ 1
well, I sent SoloLearn a bug report explaining this weird bug... at first I thought there wasn't an input stream because of the exception... but apparently it is a super strange compiler error....
0
as it looks this app does not bind the system.in to anything, so when you try to get the next line it simply can not get it (there isn't any way to give input to the program). try to use eclipse or another ide for it to work.
0
thanks
0
if James is right than it is a bug in the compiler / interpreter the app is using as the white space should be ignored...