Suppose the file Hello.txt doesn't exist. Which exception will be thrown from the method readFile?

public void readFile() throws Exception {
        try {
            FileInputStream dis = new FileInputStream("Hello.txt");
            System.out.println(dis.read());
        }
        catch (FileNotFoundException fne) {
            throw fne;
        }
        catch (IOException ioe) {
            throw ioe;
        }
        finally {
            throw new Exception("Final Exception");
        }
}

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Продовжуйте вивчати
тести з Java
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести