What is the difference between next and nextLine ?!
1/11/2017 12:21:10 AM
Omran Sulaiman2 Answers
New AnswerLet'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'
That mean "next" not take the space just take the words if not accessed space Either "nextLine" can take words with space "sentences"
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message