Solved

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

Posted on 2016-08-05
4
70 Views
Last Modified: 2016-08-06
hi,
can finally block executed even when there is a return statement inside try? please advise
0
Comment
Question by:gudii9
4 Comments
 
LVL 7

Accepted Solution

by:
James Bilous earned 250 total points
Comment Utility
A finally statement will always be called, even if the corresponding try block contains a return statement.
0
 
LVL 14

Assisted Solution

by:CPColin
CPColin earned 250 total points
Comment Utility
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
 
LVL 27

Expert Comment

by:d-glitch
Comment Utility
>>  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
 
LVL 15

Expert Comment

by:gurpsbassi
Comment Utility
Do you score points for posting questions?
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This is about my first experience with programming Arduino.
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now