+ 1
Java input in code playground
java.util.Scanner not working in code playground?? How to fix/what other ways are there?
4 Answers
+ 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();
+ 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
+ 2
ohhhhhhh. I forgot that line. Another question. How do I ask for inputs multiple times? (it worked in my IDE)
+ 1
ok thanks