BOOKJAVA Telegram 4060
Что произойдет, если поместить оператор return или System.exit () в блок try/catch?

Это очень популярный вопрос "на засыпку" по Java. Хитрость его в том, что многие программисты считают, что блок finally выполнится в любом случае. Данный вопрос ставит эту концепцию под сомнение, путем помещения оператора return в блок try/catch или вызова из блока try/catch оператора System.exit ().

Ответ на этот каверзный вопрос: блок finally будет выполняться при помещении оператора return в блок try/catch, и не будет выполняться при вызове из блока try/catch оператора System.exit ().

Мы в MAX

👉@BookJava
👍2



tgoop.com/BookJava/4060
Create:
Last Update:

Что произойдет, если поместить оператор return или System.exit () в блок try/catch?

Это очень популярный вопрос "на засыпку" по Java. Хитрость его в том, что многие программисты считают, что блок finally выполнится в любом случае. Данный вопрос ставит эту концепцию под сомнение, путем помещения оператора return в блок try/catch или вызова из блока try/catch оператора System.exit ().

Ответ на этот каверзный вопрос: блок finally будет выполняться при помещении оператора return в блок try/catch, и не будет выполняться при вызове из блока try/catch оператора System.exit ().

Мы в MAX

👉@BookJava

BY Библиотека Java разработчика


Share with your friend now:
tgoop.com/BookJava/4060

View MORE
Open in Telegram


Telegram News

Date: |

“Hey degen, are you stressed? Just let it all out,” he wrote, along with a link to join the group. As of Thursday, the SUCK Channel had 34,146 subscribers, with only one message dated August 28, 2020. It was an announcement stating that police had removed all posts on the channel because its content “contravenes the laws of Hong Kong.” Members can post their voice notes of themselves screaming. Interestingly, the group doesn’t allow to post anything else which might lead to an instant ban. As of now, there are more than 330 members in the group. With the administration mulling over limiting access to doxxing groups, a prominent Telegram doxxing group apparently went on a "revenge spree." Telegram iOS app: In the “Chats” tab, click the new message icon in the right upper corner. Select “New Channel.”
from us


Telegram Библиотека Java разработчика
FROM American