Java Interview Question and Answer what happens if the finally block has return statement

452 views · Published 6 November 2013 · 2:14 · Indexed 14 November 2026

Channel: Interview DOT · 2013 · Science & Technology

Watch on YouTube

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. Java Interview Question and Answer what happens if the finally block has return statement

If you have a return statement in both the finally block and the try block, then you could be in for a surprise. 

-- Anything that is returned in the finally block will actually override any exception 
 or returned value that is inside the try/catch block.

A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

Other Top Job Portals
www.Naukri.com
www.MonsterIndia.com
www.TimesJobs.com

Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

More from this channel