Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 107
  • 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
 
CPColinSenior Java ArchitectCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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