public class Driver { public static void main(String args[]) { // check out the JavaDoc on In.java for other read methods In infile = new In("./infile.txt") ; int num ; // read in 10 integers, if there are not 10 ints this will cause a problem for (int i = 0 ; i < 10 ; i++) { num = infile.readInt(); System.out.println(num) ; } // this reads in the rest of the infile while (!infile.isEmpty()) { num = infile.readInt(); System.out.println(num) ; } } }