import java.util.*; import java.io.*; class ReadIntegers { public static void main(String[] args) throws IOException { Reader filein = new BufferedReader( new FileReader("numbers.txt") ); Scanner scanfile = new Scanner(filein); int total = 0; while ( scanfile.hasNextInt() ) { total += scanfile.nextInt(); } System.out.println(total); } }