Can finally be used without catch?

Benjamin Brooks | 2023-05-05 14:10:00 | page views:1089
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Olivia Adams

Studied at Harvard University, Lives in Cambridge, MA
The try block defines which lines of code will be followed by the finally code. If an exception is thrown prior to the try block, the finally code will not execute. The finally block always executes when the try block exits. So you can use finally without catch but you must use try.
2023-05-10 14:10:00

Charlotte Nelson

QuesHub.com delivers expert answers and knowledge to you.
The try block defines which lines of code will be followed by the finally code. If an exception is thrown prior to the try block, the finally code will not execute. The finally block always executes when the try block exits. So you can use finally without catch but you must use try.
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4