+ 1
How come the Scanner object pops up first when asking for user input without showing the question being asked before it?
4 Antworten
+ 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.
+ 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.
+ 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!
+ 2
scanner object, of what?