Advertisements
Advertisements
Question
Which of the following is a method of Java Scanner class?
Options
nextline()
nextLine()
Nextline()
NextLine()
MCQ
Solution
nextLine()
Explanation:
The method nextLine() (with an uppercase 'L') reads a whole line of data from the user.
shaalaa.com
Is there an error in this question or solution?