+ 9

In Java how can i take input from user and store in variable like take some int input from user

8th Feb 2017, 7:07 AM
adeel salim
adeel salim - avatar
3 Answers
+ 8
this is giving new error
8th Feb 2017, 7:31 AM
adeel salim
adeel salim - avatar
+ 3
Scanner sc=new Scanner(System.in); System.out.println("enter input"); int a=sc.nextInt(); this is perfect...other and have prob
7th Jun 2017, 9:13 PM
Firoz Hanif
Firoz Hanif - avatar
+ 2
Using Scanner class Scanner x= new Scanner (System.in); int a ; a=x.nextInt(); //wait until user input
8th Feb 2017, 7:14 AM
Shreyance Gupta
Shreyance Gupta - avatar