• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 105
  • 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

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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