+ 1

Hi , how to get variable from the user?what is the code?

8th Mar 2018, 6:37 PM
Mahdi
5 Answers
+ 10
Taking user input using Scanner: https://code.sololearn.com/cWOQlJ1re4p8/?ref=app Also you may use JOptionPane dialog box to take input.
8th Mar 2018, 6:44 PM
Shamima Yasmin
Shamima Yasmin - avatar
8th Mar 2018, 6:47 PM
Hannah Grace
Hannah Grace - avatar
+ 9
Which programming language?
8th Mar 2018, 6:41 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 4
thank u all
8th Mar 2018, 6:52 PM
Mahdi
+ 3
In addition to what Sham said, you can also use the BufferedReader, InputStreamReader, and Console classes to accomplish this as well.
8th Mar 2018, 7:39 PM
Fata1 Err0r
Fata1 Err0r - avatar