+ 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 Answers
+ 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