0

java scanner command

if we want to let the input as integer from the user , the how to specify to scanner? or is their any other way?

26th Sep 2020, 6:48 AM
Sia Sara
Sia Sara - avatar
2 Réponses
+ 2
This should get an int from a user in a text-based user interface: Scanner sc = new Scanner(System.in); int n = sc.nextInt();
26th Sep 2020, 7:37 AM
Josh Greig
Josh Greig - avatar
0
Also All methods is in this.. Revise this.. https://www.sololearn.com/learn/Java/2220/
26th Sep 2020, 11:12 AM
Jayakrishna 🇮🇳