0

System.out.println(myVar.nextLine())..

Why is that nextLine() used

7th Feb 2019, 4:01 PM
Dinesh K
Dinesh K - avatar
2 Answers
+ 6
Continue with Java tutorijal! Read a complete line - nextLine() https://www.sololearn.com/learn/Java/2220/
7th Feb 2019, 6:24 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 1
Maybe this helps: Input = "Hello World" String text = input.next() --> until the first white space --> text = Hello String text = input.nextLine () --> until the end of the line --> text = Hello World
8th Feb 2019, 9:02 AM
Denise Roßberg
Denise Roßberg - avatar