+ 1
Behavior of declared Scanner variable?
3 Respostas
+ 1
Scanner is an object so I will explain it in general. A declared object just allocates the memory for the real object. Because there is no real object behind a simple declaration it can not do anything.
To get an object with functions and more you have to initialize one.
0
Scanner allows you to insert input into the program in order to create dynamic program.
0
Scanner variable = new Scanner (System.in);
int price;
price. = variable.next();