0

How to take an input without printing it?

Basically, I want to ask the user for their name, but instead of printing it back to them (no idea why so much code here just prints your input back to you), it stores it. Python was so much easier.

20th Dec 2016, 12:47 AM
Dmitrijs Kozevnikovs
4 Answers
0
If you have the code to ask the name and then print it You already have the input name in a variable You can do wherever you want with that variable
20th Dec 2016, 2:42 AM
Dago VF
Dago VF - avatar
0
Tomiwa, this comment has Java tag XD
20th Dec 2016, 4:37 AM
Dago VF
Dago VF - avatar
0
apologies. first post, thought it was c++
20th Dec 2016, 4:39 AM
Tomiwa Ogunbamowo
Tomiwa Ogunbamowo - avatar
0
In that case, use the java scanner class, make sure you import the scanner object.
20th Dec 2016, 4:41 AM
Tomiwa Ogunbamowo
Tomiwa Ogunbamowo - avatar