#Beginner JAVA - Question Help
1 messages · Page 1 of 1 (latest)
You're right, nextLine() does in fact read the whole line. So if you want the user to enter 3 inputs on the same line, scnr.next() will give you just one word, or in this case, their name. From there, you can use nextInt() or nextDouble() as you need, but be sure to call nextLine() once you're finished with that line.
I'm not sure why you're trying to use userInput instead of scnr though. userInput doesn't exist.
Wait no it does, my bad
You just replicated scnr
Thanks for this! I thought I was on the right track - I completely evaded the fact that the user input would require the user to press enter , which defeated the purposes of the prompt
I appreciate the help! The nextInt and NextDouble ended up working