How to read a file in java element by element -


i have file which's structure is

#n aa bb cc 

where n number of elements in row, , aa element(there's space between them).

so know of there's way read n , element element during rows.

here's 1 solution:

read file in line @ time split line space ["#n", "aa", "bb", "cc"] take substring of first element exclude # , parse integer 

Comments

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

java.util.scanner - How to read and add only numbers to array from a text file -

iphone - Three second countdown in cocos2d -