0

Please what is the syntax for getting input from user and storing it

13th Sep 2017, 3:07 PM
akinlabi aderibigbe
akinlabi aderibigbe - avatar
3 Respostas
+ 11
Actually, there are many methods to get user-input including the java.util.Scanner class, I did post an answer to this question which can surely help you out with all those limitations with different IDEs. https://www.sololearn.com/Discuss/597659/
13th Sep 2017, 3:26 PM
Dev
Dev - avatar
+ 4
Scanner reader = new Scanner(System.in); // Reading from System.in System.out.println("Enter a number: "); int n = reader.nextInt(); // Scans the next token of the input as an int.
13th Sep 2017, 3:08 PM
MsJ
MsJ - avatar
0
Thanks
13th Sep 2017, 3:18 PM
akinlabi aderibigbe
akinlabi aderibigbe - avatar