Ver originalScanner s = new Scanner(System.in); while (s.hasNext()){ System.out.println(s.nextInt()); }