Scanner myvar = new Scanner (System.in) Why is this used. | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

Scanner myvar = new Scanner (System.in) Why is this used.

The value is assigned from this statement:- Var=myvar.nextLine()

16th Dec 2016, 1:54 PM
Rohit thapliyal
Rohit thapliyal - avatar
1 Antwort
0
it is used to get the inputs in java it works similar to scanf in C and cin in C++
16th Dec 2016, 3:20 PM
Vijeth Belle
Vijeth Belle - avatar