Create a free account on Computer Sir Ki Class and unlock access to valuable learning resources.
Exam Paper Downloads: After registering and logging in, you can download exam question papers in PDF format to practice and prepare for your exams.
Student Support: Get assistance with your doubts, queries, and questions related to your studies. Our support is here to help you understand topics and resolve your learning difficulties.
Register today and make your exam preparation easier and more effective!
What is the difference between the Scanner class functions next() and nextLine()?
Answer:
next() read a single token i.e. all characters from the current position till a whitespace or tab or new line is encountered.
nextLine() reads an entire line i.e. all characters from the current position till a new line is encountered.
C. Sir| Created: 15-Apr-2019 | Updated: 15-Apr-2019|ICSE2017