The Scanner class method used to accept words with space:

ICSE Class 10 Computer Applications PYQ · 2023 Paper · Section A

1(iii)1 Mark · 2023 · Section A · 2023 Paper

The Scanner class method used to accept words with space:

Show SolutionHide Solution↓

nextLine()

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

← Previous questionNext question →

Browse the free Computer Applications sample bank