Given the following code:
try (Scanner scanner = new {1}(new File("test.txt"))) {
while ({2}.hasNext()) {
System.out.println(scanner.nextLine());
}
} {3} (FileNotFoundException e) {
{4}.printStackTrace();
}
Please, match missed parts of the code.