Возьмите следующий код:
try {
trySomething();
} catch (Exception e) {
//handle the exception
} finally {
//code to run after try-catch
}
//rest of the program
Чем это отличается от этого?
try {
trySomething();
} catch (Exception e) {
//handle the exception
}
//code to run after try-catch
//rest of the program
Является ли finally
полезным только для организации?
Не удалось 'Вы также помещаете остаток кода программы в finally
?