Код: Выделить всё
Scanner scanner = new Scanner(new File("hello.txt"));
while(scanner.hasNextInt()){
int i = scanner.nextInt();
System.out.println(i);
}
Подробнее здесь: https://stackoverflow.com/questions/383 ... -not-found
Код: Выделить всё
Scanner scanner = new Scanner(new File("hello.txt"));
while(scanner.hasNextInt()){
int i = scanner.nextInt();
System.out.println(i);
}