readLine and goto a position
Posted on 2004-03-21
I'm kinda new to java, i'm hoping there is a simple answer to this:
I've created in java the following,
read textfile (using the method readLine),
once each line is read in, I was wondering if I could go to a specific position in the string (i.e. char 15 and 16) and only dealing with these. If it helps a single line is as follows: " adtfg,678,dfg,62,yud,dud " so in that line I only want to deal with the 62.
I was hoping i could treat the line as an array and just skip to the number 62 but it keeps causing errors when I try to do this. And saving this value (62) as an int.
Hope that makes sense, thankyou for reading hope someone can help.