0

my file content contains four columns

001 mike 1122 98
002 stephen 1232 97

Using RandomAccessFile i need to store the each column in its respective array types.

readInt() is used to read Integer of column 1

how can i read the strings(column 2) to store in string array?

1 Answers1

0

what about using readline

http://docs.oracle.com/javase/7/docs/api/java/io/RandomAccessFile.html#readLine()

and then using a tokenizer to identify you cells

http://docs.oracle.com/javase/7/docs/api/java/util/StringTokenizer.html

and then populating your arrays ?

(in that case the RandomAccessFile is probably overkill)

gjambet
  • 369
  • 5
  • 13