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
s = new Scanner(new File("dataFile2.txt"));
System.out.println("File not found.");
Did you try that already?
Also, you could try this
x = s.nextInt();
y = s.nextFloat();