java scanner command | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Respostas
+ 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 šŸ‡®šŸ‡³