I’m a new into Java programming
What is the difference between nextLine
and readLine
in Scanner class? I know that readLine
is buffered, does that mean it’s mutable? and if it is mutable what does mutable mean, I thought that when we use nextLine
, after we type something in the command prompt, it gets recorded, and deleting doesn’t work but that wasn’t the case, I found both literally the same, not being able to find a difference between both is making me go insane.
I tried different types of programs, alternating both readLine
and nextLine
, but I can’t seem to find any change.
Tirtharaj is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1