Computer Science, asked by sattyamasiddhartha9a, 3 months ago

what is the difference between next() and next line()?​

Answers

Answered by anulekshmiaakumar111
1

Explanation:

Difference between next() and nextLine()

next() can read the input only till the space. It can't read two words separated by space. Also, next() places the cursor in the same line after reading the input. nextLine() reads input including space between the words (that is, it reads till the end of line n).

hope it helps u

Similar questions