import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; class Program01 { public static void main(String[] args) { File f = new File("adat.txt"); try { Scanner fin = new Scanner(f); while(fin.hasNextLine()) { System.out.println(Integer.parseInt(fin.nextLine())); } } catch (FileNotFoundException ex) { ex.printStackTrace(); } } }