1String input = scanner.nextLine(); // get the entire line after the prompt
2String[] numbers = input.split(" "); // split by spaces
1 Scanner scanner = new Scanner(System.in);
2
3 while(scanner.hasNext())
4 {
5 System.out.println(scanner.nextInt());
6 }