+ 3
Next & NextLine
What is the difference between next and nextLine ?!
2 Answers
+ 6
Let's imagine that numbers are words.
Then:
Next reads only words.
NextLine reads sentences.
Example:
input string: One 1 two 2 three 3
next will return only one word - 'One'
nextLine will return all string - 'One 1 two 2 three 3'
+ 4
That mean "next" not take the space just take the words if not accessed space
Either
"nextLine" can take words with space "sentences"