I am trying to read input from the console, and write it to a file. I
The thought was that the user terminates the program by simply not typing any text, just hitting enter.. I was thinking a do-/while loop could do the trick..
Anyway, here's what I got so far:
This code gives me the error:
cannot find symbol
symbol : variable fromConsole
location: class TestJava2
while (fromConsole.lenth() > 0);
Any comments on this? I have no problem setting up writing one line at a time, but it is creating the loop that gives me the problem.
I would really appreciate any help.