Why every time that my code asking for user input in Java there's always pop-up saying"looks like your program needs input"? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why every time that my code asking for user input in Java there's always pop-up saying"looks like your program needs input"?

Can't input many times, just want you to improve it, because I'm now in love in this app.

11th Nov 2020, 1:57 PM
John Michael Guadalquiver Donceras
John Michael Guadalquiver Donceras - avatar
3 Answers
11th Nov 2020, 2:14 PM
Simba
Simba - avatar
+ 4
Because you have a Scanner object in your code somewhere.
11th Nov 2020, 6:41 PM
D_Stark
D_Stark - avatar
+ 2
JM Guadalquiver Donceras it would be easier to help you find the problem if you showed us your code. As Simba pointed out that is one of the issues with SoloLearn and as D_Stark pointed out is another. Unless you structure your code a certain way for the most part you will have to insert all your desired inputs at the beginning of your code as if it was structured for multiple inputs unlike a normal executable code in a normal created app environment. https://www.sololearn.com/post/664632/?ref=app An alternative is to set up all your input values in an array or a list as a work around as far as here on SL.
12th Nov 2020, 7:40 AM
BroFar
BroFar - avatar