Advertisements
Advertisements
Question
Which of the following method will accept a string by using scanner object?
Options
next()
next.read()
next.String()
next.char()
MCQ
Solution
next()
Explanation:
next() reads a single word (string) from the input using a Scanner object.
shaalaa.com
Is there an error in this question or solution?