+ 3

How to accept inputs with Java Scanner while code is running, not beforehand?

When I run a java program that uses the Java Scanner, it asks for the input before the program begins. I need the Scanner to accept inputs intermittently while the program is running, which is I’m pretty sure how it functioned normally when I used the eclipse compiler. I’m making a game that generates a random number 1-100, and you have 5 guesses to figure out what the number is. The game tells you if your guess is higher or lower than the actual number.

24th May 2019, 12:24 AM
Connor
3 Answers
+ 1
You can't do it in sololearn you need work on a pc whit the java compiler and a text editor
24th May 2019, 2:27 AM
Paolo Torregroza
Paolo Torregroza - avatar
0
looking at other people’s published posts and seeing they are having same issue. Does solo learn seriosly not have this feature?
24th May 2019, 12:52 AM
Connor
0
Most web based compilers work the same way, jdoodle etc
24th May 2019, 3:26 AM
HNNX 🐿
HNNX 🐿 - avatar