0
Is there a way to read everything from an STDIN Java Scanner?
I'm wondering if it's possible to read everything from a Scanner(System.in) and store it into one variable. There could be any number of lines.
1 Antwort
+ 1
the concept of generics class.
will help you to do this.
https://www.sololearn.com/learn/Java/2220/?ref=app
yes you can read whole string.
using function
nextLine()
and store in a single reference variables of String class