You should probably use a Scanner, or something to read the file.

It has a nextInt() function already in it.

However, you should probably keep track of which type is a int and which is a float...