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 :)

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.