0
help me with this code
I tried to cofe it but it seems to not work.. https://code.sololearn.com/cyk4uotgNylA/?ref=app
3 Answers
+ 1
Keep that scanner outside for Loop you can run scanner only one time
possibly the error you are receiving is discussed here
https://stackoverflow.com/questions/13042008/java-util-nosuchelementexception-scanner-reading-user-input
+ 1
this Scanner declared outside loop is better, but it is Sololearn specific problem, Your code works ok on desktop. Program expects 3 x String as input.
+ 1
bro I just used a .nextLine which read the \n buffer and now the code works.



