1 Scanner scan = new Scanner(System.in);
2 String s = scan.nextLine();
3 Scanner sc = new Scanner(s);
4 List<Integer> input = new ArrayList<>();
5 while(sc.hasNext()){
6 input.add(sc.nextInt());
7 }
1 Scanner scan = new Scanner(System.in);
2 String s = scan.nextLine();
3 Scanner sc = new Scanner(s);
4 List<Integer> input = new ArrayList<>();
5 while(sc.hasNext()){
6 input.add(sc.nextInt());
7 }