To get input from user

Folks,

I came thru autoamtion interview and found that frequently they are asking to take user input in terms of some number and process ahead.

Initially i was not aware about that later i found it very much easy.

Scanner scan = new Scanner(System.in);
String s = scan.next();
int i = scan.nextInt();
 

Comments

Popular Posts