String st = sc.nextLine (); | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

String st = sc.nextLine ();

what does this mean??

14th Jun 2019, 7:02 PM
GUDLA V R L M AVINASH
GUDLA V R L M AVINASH - avatar
2 Antworten
+ 1
it gets line of text from input. input is keyboard, file, string ..
14th Jun 2019, 8:22 PM
zemiak
+ 2
I'm guessing you already have a Scanner sc. sc.nextLine() returns the next line of the Scanner (duh)
14th Jun 2019, 7:22 PM
Airree
Airree - avatar