+ 1

Behavior of declared Scanner variable?

9th Jan 2017, 4:00 AM
Deep chand
Deep chand - avatar
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.
9th Jan 2017, 10:10 AM
Andreas K
Andreas K - avatar
0
Scanner allows you to insert input into the program in order to create dynamic program.
9th Jan 2017, 4:14 AM
Segev Elmalech
Segev Elmalech - avatar
0
Scanner variable = new Scanner (System.in); int price; price. = variable.next();
18th Jan 2017, 6:17 AM
Maiara Souza