:icon_lol:Suppose there is a (method) call stack; An exception has occured in a deep level but not handled there yet; So the corresponding finally block at that level is executed first and then it is thrown to be propagated up through the call stack and at each step if it finds it executes the finally block first and then it is thrown again to be propagated up through the call stack unless it is caught. Now this exception is caught at some (middle) level of the call stack; Here also the finally block of only that corresponding level is then executed and then the program terminates.
:icon_rolleyes:Are these possible/true? What about the other finally blocks which were in the upward side of the call stack those were out of the reach of the propagation up, after handling the exception? Will they ever be executed!? Please clear the concept .......
I<LateNupurGuha -3 Newbie Poster
Taywin 312 Posting Virtuoso
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
I<LateNupurGuha -3 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.