Okay, so I want to read things in from a file. They look like this:
70 Fresno Credit Bureau Fresno CA 93714
And I want it to be in pieces, with the 70 going to an int, Fresno Credit Bureau and Fresno to go into separate strings, the state initials into separate chars, and finally feeding that last zip code into another int.
I've attempted to read it piecemeal using Scanner, and I've attempted to read it in wholesale as a string buffer and no dice either way.
while(gre.hasNextLine()){
imidate = gre.nextInt();
gre.skip(" ");
han = gre.next();
gre.skip(" ");
luke = gre.next();
gre.skip(" ");
bok = gre.next().charAt(0);
mander = gre.next().charAt(1);
gre.skip(" ");
imate = gre.nextInt();
theTree.addNode(imate, han, luke, bok, mander, imidate);
}
Which is probably screwing up on the parsing somewhere, from the looks of it, but I can't tell where. Any suggestions? Comments? Concerns?