PDA

View Full Version : Is there a way to skip a line that has no value with buffered reader



Emily
March 20th, 2011, 07:22
Ok, so basically I'm loading information from an external file using Buffered Reader.

The first value is stored as an array value. but some line values are not added such as it will go



1, 3, 4
3, 3, 4
4, 3, 4
5, 3, 4
6, 3, 4
9, 3, 4

(see how the first column the values skip instead of going up 1, 2, 3, 4, 5, 6, 7, 8, 9?)

How would I make it so that if it comes upon a value missing it just skips that value and moves on :3

Steve
March 20th, 2011, 14:57
I'm kinda lost lol.

Mystic Flow
March 20th, 2011, 15:47
if(string.length() < 1) {
continue;
}

if that's what you meant

Trey
March 20th, 2011, 15:56
Provide us with your current code, if you have any. That would make it more clear as to what the problem is.

Steve
March 20th, 2011, 20:57
I fixed it for her.