0

Hello.
Is there a way to get my program to read the next line from a file based on a condition? Let's say my file has lines with 1s and 0s, I need it so that it continues reading the line if it reads 0 until it reaches a 1 where it should begin reading the next line (btw, there are spaces between these numbers).
Any help is appreciated :)

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by darkagn
0

Yes this is certainly possible. You will need to read up on the java.io package. Pay particular attention to the File and *Reader classes. The condition part is a simple if-statement...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.