. Which of the following methods does not pertain to Scanner class?
(a) nextInt()
(b) next()
(c) nextLine()
(d) nextSentence()
Answers
Answered by
2
The Answer is (d) next sentence()
Answered by
0
The method does not pertain to Scanner class:
Explanation:
- nextInt() Scanner class method is used to read integer value from the user.
- next() and nextLine() both methods can be used to read string from the user.
- nextSentence() is not used to scanner class.
- So, (d) nextSentence() is the correct answer.
Similar questions