+ 3

How to print Scanner object?

21st Dec 2016, 3:00 PM
Mit Patel
Mit Patel - avatar
3 Answers
+ 6
Scanner myscan=new Scanner(System.in) int x=myscan.nextInt(); System.out.println ("you enter :"+x);
21st Dec 2016, 3:31 PM
Kara
Kara - avatar
+ 6
this scanner can accept only integer value
21st Dec 2016, 3:31 PM
Kara
Kara - avatar
0
You answered your own question;
29th Dec 2016, 12:09 PM
Navneet Sharma
Navneet Sharma - avatar