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 and where they are. For instance, you could do something like this
Scanner s;
try
{
s = new Scanner(new File("dataFile2.txt"));
}
catch(java.io.FileNotFoundException fnfe)
{
System.out.println("File not found.");
System.exit(1);
}
Did you try that already?
Also, you could try this
int x;
float y;
x = s.nextInt();
y = s.nextFloat();