Is there an exception?

Report a typo

What exception may occur here that we won't be able to catch while executing the code?

try (Scanner scanner = new Scanner(new File("test.txt"))) {

    int number = scanner.nextInt();

    System.out.println(number * 100);

} catch (FileNotFoundException e) {
    e.printStackTrace();
} finally {
    System.out.println("Finally part");
}

If you think that there is no such exception, write "0".

Otherwise, write the name of the exception without packages.

Enter a short text
___

Create a free account to access the full topic