MCQ Practice Single Best Answer Topic: ICSE Computer Application - Class X - 2023 PYQ

Q The Scanner class method used to accept words with space:

Question ID
#23945
Subchapter
ICSE Computer Application - Class X - 2023 PYQ
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A next()
  • B nextLine()
  • C Next()
  • D nextString()
Correct Answer: B

Explanation

nextLine()

Reason — nextLine() reads the input till the end of line so it can read a full sentence including spaces.

Share This Question

Share this MCQ with your friends or study group.