+ 1

Java input in code playground

java.util.Scanner not working in code playground?? How to fix/what other ways are there?

25th Mar 2018, 11:47 PM
eagleblood
4 Antworten
+ 5
Do you mean for your most recent code? The Scanner line in that code only creates the Scanner object. In order to scan, you need to use it like this: String name = nameInput.nextLine();
25th Mar 2018, 11:54 PM
Tamra
Tamra - avatar
+ 5
In the input box you get at the start, put each input on a separate line. They'll be used in order of when the input statement are used. Ex, for 4 inputs: 99 54 83 16
26th Mar 2018, 12:10 AM
Tamra
Tamra - avatar
+ 2
ohhhhhhh. I forgot that line. Another question. How do I ask for inputs multiple times? (it worked in my IDE)
26th Mar 2018, 12:07 AM
eagleblood
+ 1
ok thanks
26th Mar 2018, 12:11 AM
eagleblood