Sunday, 17 April 2011

Where is the clean up code like release of resources is put in try-catch-finally block and why?

 The code is put in a finally block because irrespective of try or catch block execution the control will flow to finally block. Typically finally block contains release of connections, closing of result set etc.

No comments:

Post a Comment