Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
I saw your third line of text. You are reading the first two lines of text in mary and word string variables as shown in bold. Again in first while loop you are using readLine to read a line of text in mary string variable which will read the third line of text in mary. So when you are displaying the text in first while loop you cannot read the second line again. Remedy is just remove the line word = inFile.readLine ( ) and try to rewrite code so that your code after first while loop remains valid.
}//end while
Replies: |
Sponsored Links
|