Solved

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

Posted on 2016-08-05
4
85 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
James Bilous earned 250 total points
ID: 41744448
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
ID: 41744456
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
ID: 41745057
>>  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 16

Expert Comment

by:gurpsbassi
ID: 41745397
Do you score points for posting questions?
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ArrayList Adding/settign data 3 37
Where to place postgres JDBC driver jar on tomcat 8 70
Java Inheritance super keyword use 8 71
COM server issue 2 25
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

734 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