使用DataInputStream读取文件中的float
/** nowjava **/ import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; public class Main { public static void main(String[] args) { String strFilePath = "C://Folder//readFloat.txt"; try { FileInputStream fin = new FileInputStream(strFilePath); DataInputStream din = new DataInputStream(fin); float f = din.readFloat(); System.out.println("float : " + f); din.close(); /** 来自 NowJava.com - 时 代 Java**/ } catch(FileNotFoundException fe){ System.out.println(