26th May 2020, 11:52 AM
Ian Karemi
Ian Karemi - avatar
5 Réponses
+ 2
Avinesh Thanks, It finally works!
26th May 2020, 12:58 PM
Ian Karemi
Ian Karemi - avatar
+ 1
~ swim ~ Chetali Shah Could you use an example to illustrate?
26th May 2020, 12:28 PM
Ian Karemi
Ian Karemi - avatar
+ 1
Just remove the 2nd scanner reference. Scanner name= new Scanner(System.in); String nomen = name.nextLine(); int num = name.nextInt();
26th May 2020, 12:49 PM
Avinesh
Avinesh - avatar
0
Use same scanner object to get all inputs.
26th May 2020, 12:07 PM
Chetali Shah
Chetali Shah - avatar