Java examples for File Path IO:Scanner
Read int from console using Scanner
import java.util.Scanner; public class EndOfFile { public static void main(String cLA[]) { Scanner input = new Scanner(System.in); int aNumber, anotherNumber; while (input.hasNextInt()) { aNumber = input.nextInt();/*from w w w . j ava 2s. c o m*/ anotherNumber = input.nextInt(); } } }