+ 1

How come the Scanner object pops up first when asking for user input without showing the question being asked before it?

16th Apr 2017, 6:30 PM
Rich Korba
Rich Korba - avatar
4 odpowiedzi
+ 14
That's how the online compiler works. You send all your inputs right at the start (in that dialog box that pops up). Inputs can't be done "live", unfortunately. When your code runs, it will use the inputs one at a time each time Scanner is used, as though entered normally.
16th Apr 2017, 6:40 PM
Tamra
Tamra - avatar
+ 7
Can you re-phrase the question? Not sure what you're asking. The program runs code from top to bottom, left to right, starting from main. edit: Ah, so you meant on code playground. Code playground is designed how @Tamra explained it, you'd have to run your code on a different compiler / IDE.
16th Apr 2017, 6:44 PM
Rrestoring faith
Rrestoring faith - avatar
+ 3
thanks that makes sense! EDIT - Yes sorry i meant in code playground, i was trying to build an interactive script ready for testing but it kept popping up before the question was asked. thanks for the fast answers though!
16th Apr 2017, 6:41 PM
Rich Korba
Rich Korba - avatar
+ 2
scanner object, of what?
16th Apr 2017, 7:45 PM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar