Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reading second in a text file  RSS feed

 
kris kri
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi this is Kris.

How can i read a second line in a normal text file .

In a loop, first line should be read and stored to a string/stream tokenizer and display all tokents, then read second line then store that line to string/stream tokenizer and display all tokens in second line.

This should continue until completion of all lines in a file.

I used FileReader characterStream class.

any body can suggest the coding.
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Kris. You read the second line of a file the same way you read the first. We could do your assignment for you, but that wouldn't help you learn. Why don't you post what you have and we'll help you along?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!