Quote:
|
Originally Posted by titaniumdecoy
If you really want to rewind the BufferedReader, you'll find the mark() and reset() methods useful.
However, I suggest that instead you store all the data you read in from the BufferedReader initially, close() it, and use the data you have already stored rather than rereading it.
For example, why not replace
c.print ("first line 1: " + input2.readLine()); with
c.print ("first line 1: " + inputStringFinal[0]);
|
Thanks you!! you were right. better to read in the entire file first.