+ 5

How to get user input in java?

1st Jul 2018, 11:46 AM
Anamta Fatima
Anamta Fatima - avatar
7 RĂ©ponses
+ 4
int number; Scanner variable = new Scanner(System.in); number=variable.nextInt();
1st Jul 2018, 11:50 AM
‎ ‏‏‎Anonymous Guy
+ 5
Sreejith, check out my eligibility code please
1st Jul 2018, 12:08 PM
Anamta Fatima
Anamta Fatima - avatar
+ 5
Thanks@Sreejith
1st Jul 2018, 12:21 PM
Anamta Fatima
Anamta Fatima - avatar
1st Jul 2018, 1:09 PM
David Akhihiero
David Akhihiero - avatar
+ 4
Thanks Sreejith! It worked: asks for input, but displays error on running
1st Jul 2018, 12:07 PM
Anamta Fatima
Anamta Fatima - avatar
+ 3
Anamta Fatima you need to import scanner import java.util.Scanner;
1st Jul 2018, 12:11 PM
‎ ‏‏‎Anonymous Guy
+ 3
Anamta Fatima to mention someone type @ and then select their username from the list that appears â˜șâ˜ș
1st Jul 2018, 12:23 PM
‎ ‏‏‎Anonymous Guy