I have a program that needs to read lines of input. It needs to be many lines at once. For example:
As I enter my time machine or maybe not, I wonder whether free will exists? I wonder whether free will exists maybe not as I enter my time machine or.
That all gets entered at one time by the user. I was trying to use .hasNextLine() method from Scanner class, but it is not returning false.... it waits for input again. Ive been looking around for a solution and it appears that .hasNextLine() waits for input, but i do not know what alternative to use. Any suggestions? The actual code looks like:
while(input.hasNextLine());
{
line += input.nextLine();
}
Thanks for your help