New course! Every coder should learn Generative AI!
Try a free lesson+ 3
How to print Scanner object?
3 Answers
+ 6
Scanner myscan=new Scanner(System.in)
int x=myscan.nextInt();
System.out.println ("you enter :"+x);
+ 6
this scanner can accept only integer value
0
You answered your own question;