import java.io.DataInputStream; import java.io.FileInputStream; public class Main { public static void main(String[] args) throws Exception { FileInputStream fin = new FileInputStream("C:/Float.txt"); DataInputStream din = new DataInputStream(fin); float f = din.readFloat(); System.out.println("float : " + f); din.close(); } }