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