Solved

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

Posted on 2016-08-05
4
90 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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.
If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

617 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