Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 99
  • Last Modified:

can finally block executed even when there is a return statement in try block

hi,
can finally block executed even when there is a return statement inside try? please advise
0
gudii9
Asked:
gudii9
2 Solutions
 
James BilousSoftware EngineerCommented:
A finally statement will always be called, even if the corresponding try block contains a return statement.
0
 
CPColinCommented:
Try it! Write a couple lines of code and see what it does. Experiment!

(You've asked a very similar question before, by the way, and my suggestion was similar then, too.)
0
 
d-glitchCommented:
>>  You've asked a very similar question before

Suggesting that gudii9 has not learned much about Java, debugging, independent thinking, or social behavior in the past three years.

I am actually concerned that he is posting these bizarre questions out of malice rather than ignorance.
1
 
gurpsbassiCommented:
Do you score points for posting questions?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now